/*! For license information please see vendor.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[660],{8747:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Alert:()=>J,Button:()=>tt,Carousel:()=>Pt,Collapse:()=>Zt,Dropdown:()=>ve,Modal:()=>Je,Offcanvas:()=>vn,Popover:()=>Bn,ScrollSpy:()=>Kn,Tab:()=>bi,Toast:()=>Di,Tooltip:()=>In});var i=n(6769),r=n(1576);const o=new Map,a={set(t,e,n){o.has(t)||o.set(t,new Map);const i=o.get(t);(i.has(e)||0===i.size)&&i.set(e,n)},get:(t,e)=>o.has(t)&&o.get(t).get(e)||null,remove(t,e){if(!o.has(t))return;const n=o.get(t);n.delete(e),0===n.size&&o.delete(t)}},s="transitionend",l=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),u=t=>{t.dispatchEvent(new Event(s))},c=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),h=t=>c(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(l(t)):null,d=t=>{if(!c(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const e=t.closest("summary");if(e&&e.parentNode!==n)return!1;if(null===e)return!1}return e},f=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),p=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?p(t.parentNode):null},m=()=>{},g=t=>{t.offsetHeight},v=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,y=[],b=()=>"rtl"===document.documentElement.dir,_=t=>{var e;e=()=>{const e=v();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}},"loading"===document.readyState?(y.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of y)t()})),y.push(e)):e()},w=(t,e=[],n=t)=>"function"==typeof t?t(...e):n,x=(t,e,n=!0)=>{if(!n)return void w(t);const i=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const i=Number.parseFloat(e),r=Number.parseFloat(n);return i||r?(e=e.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(n))):0})(e)+5;let r=!1;const o=({target:n})=>{n===e&&(r=!0,e.removeEventListener(s,o),w(t))};e.addEventListener(s,o),setTimeout((()=>{r||u(e)}),i)},k=(t,e,n,i)=>{const r=t.length;let o=t.indexOf(e);return-1===o?!n&&i?t[r-1]:t[0]:(o+=n?1:-1,i&&(o=(o+r)%r),t[Math.max(0,Math.min(o,r-1))])},S=/[^.]*(?=\..*)\.|.*/,C=/\..*/,T=/::\d+$/,O={};let E=1;const A={mouseenter:"mouseover",mouseleave:"mouseout"},L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function M(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function P(t){const e=M(t);return t.uidEvent=e,O[e]=O[e]||{},O[e]}function N(t,e,n=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===n))}function D(t,e,n){const i="string"==typeof e,r=i?n:e||n;let o=F(t);return L.has(o)||(o=t),[i,r,o]}function j(t,e,n,i,r){if("string"!=typeof e||!t)return;let[o,a,s]=D(e,n,i);if(e in A){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};a=t(a)}const l=P(t),u=l[s]||(l[s]={}),c=N(u,a,o?n:null);if(c)return void(c.oneOff=c.oneOff&&r);const h=M(a,e.replace(S,"")),d=o?function(t,e,n){return function i(r){const o=t.querySelectorAll(e);for(let{target:a}=r;a&&a!==this;a=a.parentNode)for(const s of o)if(s===a)return z(r,{delegateTarget:a}),i.oneOff&&B.off(t,r.type,e,n),n.apply(a,[r])}}(t,n,a):function(t,e){return function n(i){return z(i,{delegateTarget:t}),n.oneOff&&B.off(t,i.type,e),e.apply(t,[i])}}(t,a);d.delegationSelector=o?n:null,d.callable=a,d.oneOff=r,d.uidEvent=h,u[h]=d,t.addEventListener(s,d,o)}function I(t,e,n,i,r){const o=N(e[n],i,r);o&&(t.removeEventListener(n,o,Boolean(r)),delete e[n][o.uidEvent])}function R(t,e,n,i){const r=e[n]||{};for(const[o,a]of Object.entries(r))o.includes(i)&&I(t,e,n,a.callable,a.delegationSelector)}function F(t){return t=t.replace(C,""),A[t]||t}const B={on(t,e,n,i){j(t,e,n,i,!1)},one(t,e,n,i){j(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[r,o,a]=D(e,n,i),s=a!==e,l=P(t),u=l[a]||{},c=e.startsWith(".");if(void 0===o){if(c)for(const n of Object.keys(l))R(t,l,n,e.slice(1));for(const[n,i]of Object.entries(u)){const r=n.replace(T,"");s&&!e.includes(r)||I(t,l,a,i.callable,i.delegationSelector)}}else{if(!Object.keys(u).length)return;I(t,l,a,o,r?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=v();let r=null,o=!0,a=!0,s=!1;e!==F(e)&&i&&(r=i.Event(e,n),i(t).trigger(r),o=!r.isPropagationStopped(),a=!r.isImmediatePropagationStopped(),s=r.isDefaultPrevented());const l=z(new Event(e,{bubbles:o,cancelable:!0}),n);return s&&l.preventDefault(),a&&t.dispatchEvent(l),l.defaultPrevented&&r&&r.preventDefault(),l}};function z(t,e={}){for(const[n,i]of Object.entries(e))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}function q(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const W={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${H(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=q(t.dataset[i])}return e},getDataAttribute:(t,e)=>q(t.getAttribute(`data-bs-${H(e)}`))};class U{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=c(e)?W.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...c(e)?W.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,r]of Object.entries(e)){const e=t[i],o=c(e)?"element":null==(n=e)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${r}".`)}var n}}class V extends U{constructor(t,e){super(),(t=h(t))&&(this._element=t,this._config=this._getConfig(e),a.set(this._element,this.constructor.DATA_KEY,this))}dispose(){a.remove(this._element,this.constructor.DATA_KEY),B.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){x(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return a.get(h(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Z=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e?e.split(",").map((t=>l(t))).join(","):null},Y={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!f(t)&&d(t)))},getSelectorFromElement(t){const e=Z(t);return e&&Y.findOne(e)?e:null},getElementFromSelector(t){const e=Z(t);return e?Y.findOne(e):null},getMultipleElementsFromSelector(t){const e=Z(t);return e?Y.find(e):[]}},$=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;B.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),f(this))return;const r=Y.getElementFromSelector(this)||this.closest(`.${i}`);t.getOrCreateInstance(r)[e]()}))},G=".bs.alert",K=`close${G}`,X=`closed${G}`;class J extends V{static get NAME(){return"alert"}close(){if(B.trigger(this._element,K).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),B.trigger(this._element,X),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=J.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$(J,"close"),_(J);const Q='[data-bs-toggle="button"]';class tt extends V{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=tt.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}B.on(document,"click.bs.button.data-api",Q,(t=>{t.preventDefault();const e=t.target.closest(Q);tt.getOrCreateInstance(e).toggle()})),_(tt);const et=".bs.swipe",nt=`touchstart${et}`,it=`touchmove${et}`,rt=`touchend${et}`,ot=`pointerdown${et}`,at=`pointerup${et}`,st={endCallback:null,leftCallback:null,rightCallback:null},lt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ut extends U{constructor(t,e){super(),this._element=t,t&&ut.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return st}static get DefaultType(){return lt}static get NAME(){return"swipe"}dispose(){B.off(this._element,et)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),w(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&w(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(B.on(this._element,ot,(t=>this._start(t))),B.on(this._element,at,(t=>this._end(t))),this._element.classList.add("pointer-event")):(B.on(this._element,nt,(t=>this._start(t))),B.on(this._element,it,(t=>this._move(t))),B.on(this._element,rt,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ct=".bs.carousel",ht=".data-api",dt="next",ft="prev",pt="left",mt="right",gt=`slide${ct}`,vt=`slid${ct}`,yt=`keydown${ct}`,bt=`mouseenter${ct}`,_t=`mouseleave${ct}`,wt=`dragstart${ct}`,xt=`load${ct}${ht}`,kt=`click${ct}${ht}`,St="carousel",Ct="active",Tt=".active",Ot=".carousel-item",Et=Tt+Ot,At={ArrowLeft:mt,ArrowRight:pt},Lt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Mt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Pt extends V{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Y.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===St&&this.cycle()}static get Default(){return Lt}static get DefaultType(){return Mt}static get NAME(){return"carousel"}next(){this._slide(dt)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(ft)}pause(){this._isSliding&&u(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?B.one(this._element,vt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void B.one(this._element,vt,(()=>this.to(t)));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?dt:ft;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&B.on(this._element,yt,(t=>this._keydown(t))),"hover"===this._config.pause&&(B.on(this._element,bt,(()=>this.pause())),B.on(this._element,_t,(()=>this._maybeEnableCycle()))),this._config.touch&&ut.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Y.find(".carousel-item img",this._element))B.on(t,wt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(pt)),rightCallback:()=>this._slide(this._directionToOrder(mt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new ut(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=At[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Y.findOne(Tt,this._indicatorsElement);e.classList.remove(Ct),e.removeAttribute("aria-current");const n=Y.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(Ct),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===dt,r=e||k(this._getItems(),n,i,this._config.wrap);if(r===n)return;const o=this._getItemIndex(r),a=e=>B.trigger(this._element,e,{relatedTarget:r,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:o});if(a(gt).defaultPrevented)return;if(!n||!r)return;const s=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const l=i?"carousel-item-start":"carousel-item-end",u=i?"carousel-item-next":"carousel-item-prev";r.classList.add(u),g(r),n.classList.add(l),r.classList.add(l);this._queueCallback((()=>{r.classList.remove(l,u),r.classList.add(Ct),n.classList.remove(Ct,u,l),this._isSliding=!1,a(vt)}),n,this._isAnimated()),s&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Y.findOne(Et,this._element)}_getItems(){return Y.find(Ot,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return b()?t===pt?ft:dt:t===pt?dt:ft}_orderToDirection(t){return b()?t===ft?pt:mt:t===ft?mt:pt}static jQueryInterface(t){return this.each((function(){const e=Pt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}B.on(document,kt,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=Y.getElementFromSelector(this);if(!e||!e.classList.contains(St))return;t.preventDefault();const n=Pt.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===W.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),B.on(window,xt,(()=>{const t=Y.find('[data-bs-ride="carousel"]');for(const e of t)Pt.getOrCreateInstance(e)})),_(Pt);const Nt=".bs.collapse",Dt=`show${Nt}`,jt=`shown${Nt}`,It=`hide${Nt}`,Rt=`hidden${Nt}`,Ft=`click${Nt}.data-api`,Bt="show",zt="collapse",qt="collapsing",Ht=`:scope .${zt} .${zt}`,Wt='[data-bs-toggle="collapse"]',Ut={parent:null,toggle:!0},Vt={parent:"(null|element)",toggle:"boolean"};class Zt extends V{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=Y.find(Wt);for(const t of n){const e=Y.getSelectorFromElement(t),n=Y.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ut}static get DefaultType(){return Vt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Zt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(B.trigger(this._element,Dt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(zt),this._element.classList.add(qt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(qt),this._element.classList.add(zt,Bt),this._element.style[e]="",B.trigger(this._element,jt)}),this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(B.trigger(this._element,It).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(qt),this._element.classList.remove(zt,Bt);for(const t of this._triggerArray){const e=Y.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(qt),this._element.classList.add(zt),B.trigger(this._element,Rt)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Bt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=h(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Wt);for(const e of t){const t=Y.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Y.find(Ht,this._config.parent);return Y.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle("collapsed",!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const n=Zt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}B.on(document,Ft,Wt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of Y.getMultipleElementsFromSelector(this))Zt.getOrCreateInstance(t,{toggle:!1}).toggle()})),_(Zt);const Yt="dropdown",$t=".bs.dropdown",Gt=".data-api",Kt="ArrowUp",Xt="ArrowDown",Jt=`hide${$t}`,Qt=`hidden${$t}`,te=`show${$t}`,ee=`shown${$t}`,ne=`click${$t}${Gt}`,ie=`keydown${$t}${Gt}`,re=`keyup${$t}${Gt}`,oe="show",ae='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',se=`${ae}.${oe}`,le=".dropdown-menu",ue=b()?"top-end":"top-start",ce=b()?"top-start":"top-end",he=b()?"bottom-end":"bottom-start",de=b()?"bottom-start":"bottom-end",fe=b()?"left-start":"right-start",pe=b()?"right-start":"left-start",me={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ge={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class ve extends V{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Y.next(this._element,le)[0]||Y.prev(this._element,le)[0]||Y.findOne(le,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return me}static get DefaultType(){return ge}static get NAME(){return Yt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(f(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!B.trigger(this._element,te,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))B.on(t,"mouseover",m);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(oe),this._element.classList.add(oe),B.trigger(this._element,ee,t)}}hide(){if(f(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!B.trigger(this._element,Jt,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.off(t,"mouseover",m);this._popper&&this._popper.destroy(),this._menu.classList.remove(oe),this._element.classList.remove(oe),this._element.setAttribute("aria-expanded","false"),W.removeDataAttribute(this._menu,"popper"),B.trigger(this._element,Qt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!c(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Yt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:c(this._config.reference)?t=h(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=r.n4(t,this._menu,e)}_isShown(){return this._menu.classList.contains(oe)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return fe;if(t.classList.contains("dropstart"))return pe;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ce:ue:e?de:he}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(W.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...w(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const n=Y.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>d(t)));n.length&&k(n,e,t===Xt,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=ve.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Y.find(se);for(const n of e){const e=ve.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),r=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!r||"outside"===e._config.autoClose&&r)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n="Escape"===t.key,i=[Kt,Xt].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const r=this.matches(ae)?this:Y.prev(this,ae)[0]||Y.next(this,ae)[0]||Y.findOne(ae,t.delegateTarget.parentNode),o=ve.getOrCreateInstance(r);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),r.focus())}}B.on(document,ie,ae,ve.dataApiKeydownHandler),B.on(document,ie,le,ve.dataApiKeydownHandler),B.on(document,ne,ve.clearMenus),B.on(document,re,ve.clearMenus),B.on(document,ne,ae,(function(t){t.preventDefault(),ve.getOrCreateInstance(this).toggle()})),_(ve);const ye="backdrop",be="show",_e=`mousedown.bs.${ye}`,we={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},xe={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ke extends U{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return we}static get DefaultType(){return xe}static get NAME(){return ye}show(t){if(!this._config.isVisible)return void w(t);this._append();const e=this._getElement();this._config.isAnimated&&g(e),e.classList.add(be),this._emulateAnimation((()=>{w(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(be),this._emulateAnimation((()=>{this.dispose(),w(t)}))):w(t)}dispose(){this._isAppended&&(B.off(this._element,_e),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=h(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),B.on(t,_e,(()=>{w(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){x(t,this._getElement(),this._config.isAnimated)}}const Se=".bs.focustrap",Ce=`focusin${Se}`,Te=`keydown.tab${Se}`,Oe="backward",Ee={autofocus:!0,trapElement:null},Ae={autofocus:"boolean",trapElement:"element"};class Le extends U{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ee}static get DefaultType(){return Ae}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),B.off(document,Se),B.on(document,Ce,(t=>this._handleFocusin(t))),B.on(document,Te,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,B.off(document,Se))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=Y.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===Oe?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Oe:"forward")}}const Me=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Pe=".sticky-top",Ne="padding-right",De="margin-right";class je{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ne,(e=>e+t)),this._setElementAttributes(Me,Ne,(e=>e+t)),this._setElementAttributes(Pe,De,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ne),this._resetElementAttributes(Me,Ne),this._resetElementAttributes(Pe,De)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const r=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(r))}px`)}))}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&W.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const n=W.getDataAttribute(t,e);null!==n?(W.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(c(t))e(t);else for(const n of Y.find(t,this._element))e(n)}}const Ie=".bs.modal",Re=`hide${Ie}`,Fe=`hidePrevented${Ie}`,Be=`hidden${Ie}`,ze=`show${Ie}`,qe=`shown${Ie}`,He=`resize${Ie}`,We=`click.dismiss${Ie}`,Ue=`mousedown.dismiss${Ie}`,Ve=`keydown.dismiss${Ie}`,Ze=`click${Ie}.data-api`,Ye="modal-open",$e="show",Ge="modal-static",Ke={backdrop:!0,focus:!0,keyboard:!0},Xe={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Je extends V{constructor(t,e){super(t,e),this._dialog=Y.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new je,this._addEventListeners()}static get Default(){return Ke}static get DefaultType(){return Xe}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;B.trigger(this._element,ze,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ye),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;B.trigger(this._element,Re).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove($e),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){B.off(window,Ie),B.off(this._dialog,Ie),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ke({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Le({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Y.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),g(this._element),this._element.classList.add($e);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,B.trigger(this._element,qe,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){B.on(this._element,Ve,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),B.on(window,He,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),B.on(this._element,Ue,(t=>{B.one(this._element,We,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ye),this._resetAdjustments(),this._scrollBar.reset(),B.trigger(this._element,Be)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(B.trigger(this._element,Fe).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Ge)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ge),this._queueCallback((()=>{this._element.classList.remove(Ge),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=b()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=b()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=Je.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}B.on(document,Ze,'[data-bs-toggle="modal"]',(function(t){const e=Y.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),B.one(e,ze,(t=>{t.defaultPrevented||B.one(e,Be,(()=>{d(this)&&this.focus()}))}));const n=Y.findOne(".modal.show");n&&Je.getInstance(n).hide();Je.getOrCreateInstance(e).toggle(this)})),$(Je),_(Je);const Qe=".bs.offcanvas",tn=".data-api",en=`load${Qe}${tn}`,nn="show",rn="showing",on="hiding",an=".offcanvas.show",sn=`show${Qe}`,ln=`shown${Qe}`,un=`hide${Qe}`,cn=`hidePrevented${Qe}`,hn=`hidden${Qe}`,dn=`resize${Qe}`,fn=`click${Qe}${tn}`,pn=`keydown.dismiss${Qe}`,mn={backdrop:!0,keyboard:!0,scroll:!1},gn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class vn extends V{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return mn}static get DefaultType(){return gn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(B.trigger(this._element,sn,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new je).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(rn);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(nn),this._element.classList.remove(rn),B.trigger(this._element,ln,{relatedTarget:t})}),this._element,!0)}hide(){if(!this._isShown)return;if(B.trigger(this._element,un).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(on),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(nn,on),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new je).reset(),B.trigger(this._element,hn)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new ke({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():B.trigger(this._element,cn)}:null})}_initializeFocusTrap(){return new Le({trapElement:this._element})}_addEventListeners(){B.on(this._element,pn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():B.trigger(this._element,cn))}))}static jQueryInterface(t){return this.each((function(){const e=vn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}B.on(document,fn,'[data-bs-toggle="offcanvas"]',(function(t){const e=Y.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),f(this))return;B.one(e,hn,(()=>{d(this)&&this.focus()}));const n=Y.findOne(an);n&&n!==e&&vn.getInstance(n).hide();vn.getOrCreateInstance(e).toggle(this)})),B.on(window,en,(()=>{for(const t of Y.find(an))vn.getOrCreateInstance(t).show()})),B.on(window,dn,(()=>{for(const t of Y.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&vn.getOrCreateInstance(t).hide()})),$(vn),_(vn);const yn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},bn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),_n=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,wn=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!bn.has(n)||Boolean(_n.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(n)))};const xn={allowList:yn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},kn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Sn={entry:"(string|element|function|null)",selector:"(string|element)"};class Cn extends U{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return xn}static get DefaultType(){return kn}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},Sn)}_setContent(t,e,n){const i=Y.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?c(e)?this._putElementInTemplate(h(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),r=[].concat(...i.body.querySelectorAll("*"));for(const t of r){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),r=[].concat(e["*"]||[],e[n]||[]);for(const e of i)wn(e,r)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return w(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Tn=new Set(["sanitize","allowList","sanitizeFn"]),On="fade",En="show",An=".modal",Ln="hide.bs.modal",Mn="hover",Pn="focus",Nn={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},Dn={allowList:yn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},jn={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class In extends V{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Dn}static get DefaultType(){return jn}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),B.off(this._element.closest(An),Ln,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=B.trigger(this._element,this.constructor.eventName("show")),e=(p(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),B.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(En),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.on(t,"mouseover",m);this._queueCallback((()=>{B.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(B.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(En),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.off(t,"mouseover",m);this._activeTrigger.click=!1,this._activeTrigger[Pn]=!1,this._activeTrigger[Mn]=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),B.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(On,En),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(On),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Cn({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(On)}_isShown(){return this.tip&&this.tip.classList.contains(En)}_createPopper(t){const e=w(this._config.placement,[this,t,this._element]),n=Nn[e.toUpperCase()];return r.n4(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return w(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...w(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)B.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Mn?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=e===Mn?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");B.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Pn:Mn]=!0,e._enter()})),B.on(this._element,n,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Pn:Mn]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},B.on(this._element.closest(An),Ln,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=W.getDataAttributes(this._element);for(const t of Object.keys(e))Tn.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:h(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,n]of Object.entries(this._config))this.constructor.Default[e]!==n&&(t[e]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=In.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}_(In);const Rn={...In.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Fn={...In.DefaultType,content:"(null|string|element|function)"};class Bn extends In{static get Default(){return Rn}static get DefaultType(){return Fn}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Bn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}_(Bn);const zn=".bs.scrollspy",qn=`activate${zn}`,Hn=`click${zn}`,Wn=`load${zn}.data-api`,Un="active",Vn="[href]",Zn=".nav-link",Yn=`${Zn}, .nav-item > ${Zn}, .list-group-item`,$n={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Gn={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Kn extends V{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return $n}static get DefaultType(){return Gn}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=h(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(B.off(this._config.target,Hn),B.on(this._config.target,Hn,Vn,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const n=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),n=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,r=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&t){if(n(o),!i)return}else r||t||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Y.find(Vn,this._config.target);for(const e of t){if(!e.hash||f(e))continue;const t=Y.findOne(decodeURI(e.hash),this._element);d(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Un),this._activateParents(t),B.trigger(this._element,qn,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Y.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Un);else for(const e of Y.parents(t,".nav, .list-group"))for(const t of Y.prev(e,Yn))t.classList.add(Un)}_clearActiveClass(t){t.classList.remove(Un);const e=Y.find(`${Vn}.${Un}`,t);for(const t of e)t.classList.remove(Un)}static jQueryInterface(t){return this.each((function(){const e=Kn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}B.on(window,Wn,(()=>{for(const t of Y.find('[data-bs-spy="scroll"]'))Kn.getOrCreateInstance(t)})),_(Kn);const Xn=".bs.tab",Jn=`hide${Xn}`,Qn=`hidden${Xn}`,ti=`show${Xn}`,ei=`shown${Xn}`,ni=`click${Xn}`,ii=`keydown${Xn}`,ri=`load${Xn}`,oi="ArrowLeft",ai="ArrowRight",si="ArrowUp",li="ArrowDown",ui="Home",ci="End",hi="active",di="fade",fi="show",pi=".dropdown-toggle",mi=`:not(${pi})`,gi='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',vi=`${`.nav-link${mi}, .list-group-item${mi}, [role="tab"]${mi}`}, ${gi}`,yi=`.${hi}[data-bs-toggle="tab"], .${hi}[data-bs-toggle="pill"], .${hi}[data-bs-toggle="list"]`;class bi extends V{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),B.on(this._element,ii,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),n=e?B.trigger(e,Jn,{relatedTarget:t}):null;B.trigger(t,ti,{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(hi),this._activate(Y.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),B.trigger(t,ei,{relatedTarget:e})):t.classList.add(fi)}),t,t.classList.contains(di))}_deactivate(t,e){if(!t)return;t.classList.remove(hi),t.blur(),this._deactivate(Y.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),B.trigger(t,Qn,{relatedTarget:e})):t.classList.remove(fi)}),t,t.classList.contains(di))}_keydown(t){if(![oi,ai,si,li,ui,ci].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!f(t)));let n;if([ui,ci].includes(t.key))n=e[t.key===ui?0:e.length-1];else{const i=[ai,li].includes(t.key);n=k(e,t.target,i,!0)}n&&(n.focus({preventScroll:!0}),bi.getOrCreateInstance(n).show())}_getChildren(){return Y.find(vi,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),n=this._getOuterElement(t);t.setAttribute("aria-selected",e),n!==t&&this._setAttributeIfNotExists(n,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=Y.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains("dropdown"))return;const i=(t,i)=>{const r=Y.findOne(t,n);r&&r.classList.toggle(i,e)};i(pi,hi),i(".dropdown-menu",fi),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(hi)}_getInnerElement(t){return t.matches(vi)?t:Y.findOne(vi,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=bi.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}B.on(document,ni,gi,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),f(this)||bi.getOrCreateInstance(this).show()})),B.on(window,ri,(()=>{for(const t of Y.find(yi))bi.getOrCreateInstance(t)})),_(bi);const _i=".bs.toast",wi=`mouseover${_i}`,xi=`mouseout${_i}`,ki=`focusin${_i}`,Si=`focusout${_i}`,Ci=`hide${_i}`,Ti=`hidden${_i}`,Oi=`show${_i}`,Ei=`shown${_i}`,Ai="hide",Li="show",Mi="showing",Pi={animation:"boolean",autohide:"boolean",delay:"number"},Ni={animation:!0,autohide:!0,delay:5e3};class Di extends V{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Ni}static get DefaultType(){return Pi}static get NAME(){return"toast"}show(){if(B.trigger(this._element,Oi).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(Ai),g(this._element),this._element.classList.add(Li,Mi),this._queueCallback((()=>{this._element.classList.remove(Mi),B.trigger(this._element,Ei),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(B.trigger(this._element,Ci).defaultPrevented)return;this._element.classList.add(Mi),this._queueCallback((()=>{this._element.classList.add(Ai),this._element.classList.remove(Mi,Li),B.trigger(this._element,Ti)}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Li),super.dispose()}isShown(){return this._element.classList.contains(Li)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){B.on(this._element,wi,(t=>this._onInteraction(t,!0))),B.on(this._element,xi,(t=>this._onInteraction(t,!1))),B.on(this._element,ki,(t=>this._onInteraction(t,!0))),B.on(this._element,Si,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Di.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$(Di),_(Di)},4052:(t,e,n)=>{"use strict";n.d(e,{A:()=>g});var i="#fff",r="20px";var o,a,s='"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace',l="40px",u="\n  .codeflask {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    overflow: hidden;\n  }\n\n  .codeflask, .codeflask * {\n    box-sizing: border-box;\n  }\n\n  .codeflask__pre {\n    pointer-events: none;\n    z-index: 3;\n    overflow: hidden;\n  }\n\n  .codeflask__textarea {\n    background: none;\n    border: none;\n    color: "+(o="caret-color",a="#000",("undefined"!=typeof CSS?CSS.supports(o,a):"undefined"!=typeof document&&function(t){return(t=t.split("-").filter((function(t){return!!t})).map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""))[0].toLowerCase()+t.substr(1)}(o)in document.body.style)?i:"#ccc")+";\n    z-index: 1;\n    resize: none;\n    font-family: "+s+";\n    -webkit-appearance: pre;\n    caret-color: #111;\n    z-index: 2;\n    width: 100%;\n    height: 100%;\n  }\n\n  .codeflask--has-line-numbers .codeflask__textarea {\n    width: calc(100% - "+l+");\n  }\n\n  .codeflask__code {\n    display: block;\n    font-family: "+s+";\n    overflow: hidden;\n  }\n\n  .codeflask__flatten {\n    padding: 10px;\n    font-size: 13px;\n    line-height: "+r+";\n    white-space: pre;\n    position: absolute;\n    top: 0;\n    left: 0;\n    overflow: auto;\n    margin: 0 !important;\n    outline: none;\n    text-align: left;\n  }\n\n  .codeflask--has-line-numbers .codeflask__flatten {\n    width: calc(100% - "+l+");\n    left: "+l+";\n  }\n\n  .codeflask__line-highlight {\n    position: absolute;\n    top: 10px;\n    left: 0;\n    width: 100%;\n    height: "+r+";\n    background: rgba(0,0,0,0.1);\n    z-index: 1;\n  }\n\n  .codeflask__lines {\n    padding: 10px 4px;\n    font-size: 12px;\n    line-height: "+r+";\n    font-family: 'Cousine', monospace;\n    position: absolute;\n    left: 0;\n    top: 0;\n    width: "+l+";\n    height: 100%;\n    text-align: right;\n    color: #999;\n    z-index: 2;\n  }\n\n  .codeflask__lines__line {\n    display: block;\n  }\n\n  .codeflask.codeflask--has-line-numbers {\n    padding-left: "+l+";\n  }\n\n  .codeflask.codeflask--has-line-numbers:before {\n    content: '';\n    position: absolute;\n    left: 0;\n    top: 0;\n    width: "+l+";\n    height: 100%;\n    background: #eee;\n    z-index: 1;\n  }\n";function c(t,e,n){var i=e||"codeflask-style",r=n||document.head;if(!t)return!1;if(document.getElementById(i))return!0;var o=document.createElement("style");return o.innerHTML=t,o.id=i,r.appendChild(o),!0}var h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function d(t){return String(t).replace(/[&<>"'`=/]/g,(function(t){return h[t]}))}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};var p=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e=function(t){var e=/\blang(?:uage)?-([\w-]+)\b/i,n=0,i={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function(t){return t instanceof r?new r(t.type,i.util.encode(t.content),t.alias):Array.isArray(t)?t.map(i.util.encode):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++n}),t.__id},clone:function t(e,n){var r,o,a=i.util.type(e);switch(n=n||{},a){case"Object":if(o=i.util.objId(e),n[o])return n[o];for(var s in r={},n[o]=r,e)e.hasOwnProperty(s)&&(r[s]=t(e[s],n));return r;case"Array":return o=i.util.objId(e),n[o]?n[o]:(r=[],n[o]=r,e.forEach((function(e,i){r[i]=t(e,n)})),r);default:return e}}},languages:{extend:function(t,e){var n=i.util.clone(i.languages[t]);for(var r in e)n[r]=e[r];return n},insertBefore:function(t,e,n,r){var o=(r=r||i.languages)[t],a={};for(var s in o)if(o.hasOwnProperty(s)){if(s==e)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(s)||(a[s]=o[s])}var u=r[t];return r[t]=a,i.languages.DFS(i.languages,(function(e,n){n===u&&e!=t&&(this[e]=a)})),a},DFS:function t(e,n,r,o){o=o||{};var a=i.util.objId;for(var s in e)if(e.hasOwnProperty(s)){n.call(e,s,e[s],r||s);var l=e[s],u=i.util.type(l);"Object"!==u||o[a(l)]?"Array"!==u||o[a(l)]||(o[a(l)]=!0,t(l,n,s,o)):(o[a(l)]=!0,t(l,n,null,o))}}},plugins:{},highlightAll:function(t,e){i.highlightAllUnder(document,t,e)},highlightAllUnder:function(t,e,n){var r={callback:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",r);for(var o,a=r.elements||t.querySelectorAll(r.selector),s=0;o=a[s++];)i.highlightElement(o,!0===e,r.callback)},highlightElement:function(n,r,o){for(var a,s,l=n;l&&!e.test(l.className);)l=l.parentNode;l&&(a=(l.className.match(e)||[,""])[1].toLowerCase(),s=i.languages[a]),n.className=n.className.replace(e,"").replace(/\s+/g," ")+" language-"+a,n.parentNode&&(l=n.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+a));var u={element:n,language:a,grammar:s,code:n.textContent},c=function(t){u.highlightedCode=t,i.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,i.hooks.run("after-highlight",u),i.hooks.run("complete",u),o&&o.call(u.element)};if(i.hooks.run("before-sanity-check",u),u.code)if(i.hooks.run("before-highlight",u),u.grammar)if(r&&t.Worker){var h=new Worker(i.filename);h.onmessage=function(t){c(t.data)},h.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else c(i.highlight(u.code,u.grammar,u.language));else c(i.util.encode(u.code));else i.hooks.run("complete",u)},highlight:function(t,e,n){var o={code:t,grammar:e,language:n};return i.hooks.run("before-tokenize",o),o.tokens=i.tokenize(o.code,o.grammar),i.hooks.run("after-tokenize",o),r.stringify(i.util.encode(o.tokens),o.language)},matchGrammar:function(t,e,n,o,a,s,l){for(var u in n)if(n.hasOwnProperty(u)&&n[u]){if(u==l)return;var c=n[u];c="Array"===i.util.type(c)?c:[c];for(var h=0;h<c.length;++h){var d=c[h],f=d.inside,p=!!d.lookbehind,m=!!d.greedy,g=0,v=d.alias;if(m&&!d.pattern.global){var y=d.pattern.toString().match(/[imuy]*$/)[0];d.pattern=RegExp(d.pattern.source,y+"g")}d=d.pattern||d;for(var b=o,_=a;b<e.length;_+=e[b].length,++b){var w=e[b];if(e.length>t.length)return;if(!(w instanceof r)){if(m&&b!=e.length-1){if(d.lastIndex=_,!(O=d.exec(t)))break;for(var x=O.index+(p?O[1].length:0),k=O.index+O[0].length,S=b,C=_,T=e.length;S<T&&(C<k||!e[S].type&&!e[S-1].greedy);++S)x>=(C+=e[S].length)&&(++b,_=C);if(e[b]instanceof r)continue;E=S-b,w=t.slice(_,C),O.index-=_}else{d.lastIndex=0;var O=d.exec(w),E=1}if(O){p&&(g=O[1]?O[1].length:0),k=(x=O.index+g)+(O=O[0].slice(g)).length;var A=w.slice(0,x),L=w.slice(k),M=[b,E];A&&(++b,_+=A.length,M.push(A));var P=new r(u,f?i.tokenize(O,f):O,v,O,m);if(M.push(P),L&&M.push(L),Array.prototype.splice.apply(e,M),1!=E&&i.matchGrammar(t,e,n,b,_,!0,u),s)break}else if(s)break}}}}},tokenize:function(t,e){var n=[t],r=e.rest;if(r){for(var o in r)e[o]=r[o];delete e.rest}return i.matchGrammar(t,n,e,0,0,!1),n},hooks:{all:{},add:function(t,e){var n=i.hooks.all;n[t]=n[t]||[],n[t].push(e)},run:function(t,e){var n=i.hooks.all[t];if(n&&n.length)for(var r,o=0;r=n[o++];)r(e)}},Token:r};function r(t,e,n,i,r){this.type=t,this.content=e,this.alias=n,this.length=0|(i||"").length,this.greedy=!!r}if(t.Prism=i,r.stringify=function(t,e,n){if("string"==typeof t)return t;if(Array.isArray(t))return t.map((function(n){return r.stringify(n,e,t)})).join("");var o={type:t.type,content:r.stringify(t.content,e,n),tag:"span",classes:["token",t.type],attributes:{},language:e,parent:n};if(t.alias){var a=Array.isArray(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(o.classes,a)}i.hooks.run("wrap",o);var s=Object.keys(o.attributes).map((function(t){return t+'="'+(o.attributes[t]||"").replace(/"/g,"&quot;")+'"'})).join(" ");return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+(s?" "+s:"")+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener?(i.disableWorkerMessageHandler||t.addEventListener("message",(function(e){var n=JSON.parse(e.data),r=n.language,o=n.code,a=n.immediateClose;t.postMessage(i.highlight(o,i.languages[r],r)),a&&t.close()}),!1),i):i;var o=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return o&&(i.filename=o.src,i.manual||o.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(i.highlightAll):window.setTimeout(i.highlightAll,16):document.addEventListener("DOMContentLoaded",i.highlightAll))),i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});t.exports&&(t.exports=e),void 0!==f&&(f.Prism=e),e.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var i={};i["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};r["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var o={};o[t]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,t),"i"),lookbehind:!0,greedy:!0,inside:r},e.languages.insertBefore("markup","cdata",o)}}),e.languages.xml=e.languages.extend("markup",{}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,function(t){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:RegExp("url\\((?:"+e.source+"|.*?)\\)","i"),selector:RegExp("[^{}\\s](?:[^{};\"']|"+e.source+")*?(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),t.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:t.languages.css}},alias:"language-css"}},n.tag))}(e),e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}}}),e.languages.markup&&e.languages.markup.tag.addInlined("script","javascript"),e.languages.js=e.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(t){t=t||document;var n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(t.querySelectorAll("pre[data-src]")).forEach((function(t){if(!t.hasAttribute("data-src-loaded")){for(var i,r=t.getAttribute("data-src"),o=t,a=/\blang(?:uage)?-([\w-]+)\b/i;o&&!a.test(o.className);)o=o.parentNode;if(o&&(i=(t.className.match(a)||[,""])[1]),!i){var s=(r.match(/\.(\w+)$/)||[,""])[1];i=n[s]||s}var l=document.createElement("code");l.className="language-"+i,t.textContent="",l.textContent="Loading…",t.appendChild(l);var u=new XMLHttpRequest;u.open("GET",r,!0),u.onreadystatechange=function(){4==u.readyState&&(u.status<400&&u.responseText?(l.textContent=u.responseText,e.highlightElement(l),t.setAttribute("data-src-loaded","")):u.status>=400?l.textContent="✖ Error "+u.status+" while fetching file: "+u.statusText:l.textContent="✖ Error: File does not exist or is empty")},u.send(null)}})),e.plugins.toolbar&&e.plugins.toolbar.registerButton("download-file",(function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var n=e.getAttribute("data-src"),i=document.createElement("a");return i.textContent=e.getAttribute("data-download-link-label")||"Download",i.setAttribute("download",""),i.href=n,i}}))},document.addEventListener("DOMContentLoaded",(function(){self.Prism.fileHighlight()})))})),m=function(t,e){if(!t)throw Error("CodeFlask expects a parameter which is Element or a String selector");if(!e)throw Error("CodeFlask expects an object containing options as second parameter");if(t.nodeType)this.editorRoot=t;else{var n=document.querySelector(t);n&&(this.editorRoot=n)}this.opts=e,this.startEditor()};m.prototype.startEditor=function(){if(!c(u,null,this.opts.styleParent))throw Error("Failed to inject CodeFlask CSS.");this.createWrapper(),this.createTextarea(),this.createPre(),this.createCode(),this.runOptions(),this.listenTextarea(),this.populateDefault(),this.updateCode(this.code)},m.prototype.createWrapper=function(){this.code=this.editorRoot.innerHTML,this.editorRoot.innerHTML="",this.elWrapper=this.createElement("div",this.editorRoot),this.elWrapper.classList.add("codeflask")},m.prototype.createTextarea=function(){this.elTextarea=this.createElement("textarea",this.elWrapper),this.elTextarea.classList.add("codeflask__textarea","codeflask__flatten")},m.prototype.createPre=function(){this.elPre=this.createElement("pre",this.elWrapper),this.elPre.classList.add("codeflask__pre","codeflask__flatten")},m.prototype.createCode=function(){this.elCode=this.createElement("code",this.elPre),this.elCode.classList.add("codeflask__code","language-"+(this.opts.language||"html"))},m.prototype.createLineNumbers=function(){this.elLineNumbers=this.createElement("div",this.elWrapper),this.elLineNumbers.classList.add("codeflask__lines"),this.setLineNumber()},m.prototype.createElement=function(t,e){var n=document.createElement(t);return e.appendChild(n),n},m.prototype.runOptions=function(){this.opts.rtl=this.opts.rtl||!1,this.opts.tabSize=this.opts.tabSize||2,this.opts.enableAutocorrect=this.opts.enableAutocorrect||!1,this.opts.lineNumbers=this.opts.lineNumbers||!1,this.opts.defaultTheme=!1!==this.opts.defaultTheme,this.opts.areaId=this.opts.areaId||null,this.opts.ariaLabelledby=this.opts.ariaLabelledby||null,this.opts.readonly=this.opts.readonly||null,"boolean"!=typeof this.opts.handleTabs&&(this.opts.handleTabs=!0),"boolean"!=typeof this.opts.handleSelfClosingCharacters&&(this.opts.handleSelfClosingCharacters=!0),"boolean"!=typeof this.opts.handleNewLineIndentation&&(this.opts.handleNewLineIndentation=!0),!0===this.opts.rtl&&(this.elTextarea.setAttribute("dir","rtl"),this.elPre.setAttribute("dir","rtl")),!1===this.opts.enableAutocorrect&&(this.elTextarea.setAttribute("spellcheck","false"),this.elTextarea.setAttribute("autocapitalize","off"),this.elTextarea.setAttribute("autocomplete","off"),this.elTextarea.setAttribute("autocorrect","off")),this.opts.lineNumbers&&(this.elWrapper.classList.add("codeflask--has-line-numbers"),this.createLineNumbers()),this.opts.defaultTheme&&c("\n.codeflask {\n  background: #fff;\n  color: #4f559c;\n}\n\n.codeflask .token.punctuation {\n  color: #4a4a4a;\n}\n\n.codeflask .token.keyword {\n  color: #8500ff;\n}\n\n.codeflask .token.operator {\n  color: #ff5598;\n}\n\n.codeflask .token.string {\n  color: #41ad8f;\n}\n\n.codeflask .token.comment {\n  color: #9badb7;\n}\n\n.codeflask .token.function {\n  color: #8500ff;\n}\n\n.codeflask .token.boolean {\n  color: #8500ff;\n}\n\n.codeflask .token.number {\n  color: #8500ff;\n}\n\n.codeflask .token.selector {\n  color: #8500ff;\n}\n\n.codeflask .token.property {\n  color: #8500ff;\n}\n\n.codeflask .token.tag {\n  color: #8500ff;\n}\n\n.codeflask .token.attr-value {\n  color: #8500ff;\n}\n","theme-default",this.opts.styleParent),this.opts.areaId&&this.elTextarea.setAttribute("id",this.opts.areaId),this.opts.ariaLabelledby&&this.elTextarea.setAttribute("aria-labelledby",this.opts.ariaLabelledby),this.opts.readonly&&this.enableReadonlyMode()},m.prototype.updateLineNumbersCount=function(){for(var t="",e=1;e<=this.lineNumber;e++)t=t+'<span class="codeflask__lines__line">'+e+"</span>";this.elLineNumbers.innerHTML=t},m.prototype.listenTextarea=function(){var t=this;this.elTextarea.addEventListener("input",(function(e){t.code=e.target.value,t.elCode.innerHTML=d(e.target.value),t.highlight(),setTimeout((function(){t.runUpdate(),t.setLineNumber()}),1)})),this.elTextarea.addEventListener("keydown",(function(e){t.handleTabs(e),t.handleSelfClosingCharacters(e),t.handleNewLineIndentation(e)})),this.elTextarea.addEventListener("scroll",(function(e){t.elPre.style.transform="translate3d(-"+e.target.scrollLeft+"px, -"+e.target.scrollTop+"px, 0)",t.elLineNumbers&&(t.elLineNumbers.style.transform="translate3d(0, -"+e.target.scrollTop+"px, 0)")}))},m.prototype.handleTabs=function(t){if(this.opts.handleTabs){if(9!==t.keyCode)return;t.preventDefault();var e=this.elTextarea,n=e.selectionDirection,i=e.selectionStart,r=e.selectionEnd,o=e.value,a=o.substr(0,i),s=o.substring(i,r),l=o.substring(r),u=" ".repeat(this.opts.tabSize);if(i!==r&&s.length>=u.length){var c=i-a.split("\n").pop().length,h=u.length,d=u.length;t.shiftKey?(o.substr(c,u.length)===u?(h=-h,c>i?(s=s.substring(0,c)+s.substring(c+u.length),d=0):c===i?(h=0,d=0,s=s.substring(u.length)):(d=-d,a=a.substring(0,c)+a.substring(c+u.length))):(h=0,d=0),s=s.replace(new RegExp("\n"+u.split("").join("\\"),"g"),"\n")):(a=a.substr(0,c)+u+a.substring(c,i),s=s.replace(/\n/g,"\n"+u)),e.value=a+s+l,e.selectionStart=i+h,e.selectionEnd=i+s.length+d,e.selectionDirection=n}else e.value=a+u+l,e.selectionStart=i+u.length,e.selectionEnd=i+u.length;var f=e.value;this.updateCode(f),this.elTextarea.selectionEnd=r+this.opts.tabSize}},m.prototype.handleSelfClosingCharacters=function(t){if(this.opts.handleSelfClosingCharacters){var e=t.key;if(["(","[","{","<","'",'"'].includes(e)||[")","]","}",">","'",'"'].includes(e))switch(e){case"(":case")":case"[":case"]":case"{":case"}":case"<":case">":case"'":case'"':this.closeCharacter(e)}}},m.prototype.setLineNumber=function(){this.lineNumber=this.code.split("\n").length,this.opts.lineNumbers&&this.updateLineNumbersCount()},m.prototype.handleNewLineIndentation=function(t){if(this.opts.handleNewLineIndentation&&13===t.keyCode){t.preventDefault();var e=this.elTextarea,n=e.selectionStart,i=e.selectionEnd,r=e.value,o=r.substr(0,n),a=r.substring(i),s=r.lastIndexOf("\n",n-1),l=s+r.slice(s+1).search(/[^ ]|$/),u=l>s?l-s:0,c=o+"\n"+" ".repeat(u)+a;e.value=c,e.selectionStart=n+u+1,e.selectionEnd=n+u+1,this.updateCode(e.value)}},m.prototype.closeCharacter=function(t){var e=this.elTextarea.selectionStart,n=this.elTextarea.selectionEnd;if(this.skipCloseChar(t)){var i=this.code.substr(n,1)===t,r=i?n+1:n,o=!i&&["'",'"'].includes(t)?t:"",a=""+this.code.substring(0,e)+o+this.code.substring(r);this.updateCode(a),this.elTextarea.selectionEnd=++this.elTextarea.selectionStart}else{var s=t;switch(t){case"(":s=String.fromCharCode(t.charCodeAt()+1);break;case"<":case"{":case"[":s=String.fromCharCode(t.charCodeAt()+2)}var l=this.code.substring(e,n),u=""+this.code.substring(0,e)+l+s+this.code.substring(n);this.updateCode(u)}this.elTextarea.selectionEnd=e},m.prototype.skipCloseChar=function(t){var e=this.elTextarea.selectionStart,n=this.elTextarea.selectionEnd,i=Math.abs(n-e)>0;return[")","}","]",">"].includes(t)||["'",'"'].includes(t)&&!i},m.prototype.updateCode=function(t){this.code=t,this.elTextarea.value=t,this.elCode.innerHTML=d(t),this.highlight(),this.setLineNumber(),setTimeout(this.runUpdate.bind(this),1)},m.prototype.updateLanguage=function(t){var e=this.opts.language;this.elCode.classList.remove("language-"+e),this.elCode.classList.add("language-"+t),this.opts.language=t,this.highlight()},m.prototype.addLanguage=function(t,e){p.languages[t]=e},m.prototype.populateDefault=function(){this.updateCode(this.code)},m.prototype.highlight=function(){p.highlightElement(this.elCode,!1)},m.prototype.onUpdate=function(t){if(t&&"[object Function]"!=={}.toString.call(t))throw Error("CodeFlask expects callback of type Function");this.updateCallBack=t},m.prototype.getCode=function(){return this.code},m.prototype.runUpdate=function(){this.updateCallBack&&this.updateCallBack(this.code)},m.prototype.enableReadonlyMode=function(){this.elTextarea.setAttribute("readonly",!0)},m.prototype.disableReadonlyMode=function(){this.elTextarea.removeAttribute("readonly")};const g=m},5643:function(t){t.exports=function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){a(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,p(i.key),i)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t,e,n){return(e=p(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return l(t)||u(t)||c(t)||d()}function l(t){if(Array.isArray(t))return h(t)}function u(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function c(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function p(t){var e=f(t,"string");return"symbol"==typeof e?e:String(e)}var m="undefined"!=typeof window&&void 0!==window.document,g=m?window:{},v=!(!m||!g.document.documentElement)&&"ontouchstart"in g.document.documentElement,y=!!m&&"PointerEvent"in g,b="cropper",_="all",w="crop",x="move",k="zoom",S="e",C="w",T="s",O="n",E="ne",A="nw",L="se",M="sw",P="".concat(b,"-crop"),N="".concat(b,"-disabled"),D="".concat(b,"-hidden"),j="".concat(b,"-hide"),I="".concat(b,"-invisible"),R="".concat(b,"-modal"),F="".concat(b,"-move"),B="".concat(b,"Action"),z="".concat(b,"Preview"),q="crop",H="move",W="none",U="crop",V="cropend",Z="cropmove",Y="cropstart",$="dblclick",G=v?"touchstart":"mousedown",K=v?"touchmove":"mousemove",X=v?"touchend touchcancel":"mouseup",J=y?"pointerdown":G,Q=y?"pointermove":K,tt=y?"pointerup pointercancel":X,et="ready",nt="resize",it="wheel",rt="zoom",ot="image/jpeg",at=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,st=/^data:/,lt=/^data:image\/jpeg;base64,/,ut=/^img|canvas$/i,ct=200,ht=100,dt={viewMode:0,dragMode:q,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:ct,minContainerHeight:ht,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ft='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',pt=Number.isNaN||g.isNaN;function mt(t){return"number"==typeof t&&!pt(t)}var gt=function(t){return t>0&&t<1/0};function vt(t){return void 0===t}function yt(t){return"object"===n(t)&&null!==t}var bt=Object.prototype.hasOwnProperty;function _t(t){if(!yt(t))return!1;try{var e=t.constructor,n=e.prototype;return e&&n&&bt.call(n,"isPrototypeOf")}catch(t){return!1}}function wt(t){return"function"==typeof t}var xt=Array.prototype.slice;function kt(t){return Array.from?Array.from(t):xt.call(t)}function St(t,e){return t&&wt(e)&&(Array.isArray(t)||mt(t.length)?kt(t).forEach((function(n,i){e.call(t,n,i,t)})):yt(t)&&Object.keys(t).forEach((function(n){e.call(t,t[n],n,t)}))),t}var Ct=Object.assign||function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return yt(t)&&n.length>0&&n.forEach((function(e){yt(e)&&Object.keys(e).forEach((function(n){t[n]=e[n]}))})),t},Tt=/\.\d*(?:0|9){12}\d*$/;function Ot(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Tt.test(t)?Math.round(t*e)/e:t}var Et=/^width|height|left|top|marginLeft|marginTop$/;function At(t,e){var n=t.style;St(e,(function(t,e){Et.test(e)&&mt(t)&&(t="".concat(t,"px")),n[e]=t}))}function Lt(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function Mt(t,e){if(e)if(mt(t.length))St(t,(function(t){Mt(t,e)}));else if(t.classList)t.classList.add(e);else{var n=t.className.trim();n?n.indexOf(e)<0&&(t.className="".concat(n," ").concat(e)):t.className=e}}function Pt(t,e){e&&(mt(t.length)?St(t,(function(t){Pt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Nt(t,e,n){e&&(mt(t.length)?St(t,(function(t){Nt(t,e,n)})):n?Mt(t,e):Pt(t,e))}var Dt=/([a-z\d])([A-Z])/g;function jt(t){return t.replace(Dt,"$1-$2").toLowerCase()}function It(t,e){return yt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(jt(e)))}function Rt(t,e,n){yt(n)?t[e]=n:t.dataset?t.dataset[e]=n:t.setAttribute("data-".concat(jt(e)),n)}function Ft(t,e){if(yt(t[e]))try{delete t[e]}catch(n){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(n){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(jt(e)))}var Bt=/\s\s*/,zt=function(){var t=!1;if(m){var e=!1,n=function(){},i=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});g.addEventListener("test",n,i),g.removeEventListener("test",n,i)}return t}();function qt(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;e.trim().split(Bt).forEach((function(e){if(!zt){var o=t.listeners;o&&o[e]&&o[e][n]&&(r=o[e][n],delete o[e][n],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,r,i)}))}function Ht(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;e.trim().split(Bt).forEach((function(e){if(i.once&&!zt){var o=t.listeners,a=void 0===o?{}:o;r=function(){delete a[e][n],t.removeEventListener(e,r,i);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(t,s)},a[e]||(a[e]={}),a[e][n]&&t.removeEventListener(e,a[e][n],i),a[e][n]=r,t.listeners=a}t.addEventListener(e,r,i)}))}function Wt(t,e,n){var i;return wt(Event)&&wt(CustomEvent)?i=new CustomEvent(e,{detail:n,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,n),t.dispatchEvent(i)}function Ut(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Vt=g.location,Zt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Yt(t){var e=t.match(Zt);return null!==e&&(e[1]!==Vt.protocol||e[2]!==Vt.hostname||e[3]!==Vt.port)}function $t(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Gt(t){var e=t.rotate,n=t.scaleX,i=t.scaleY,r=t.translateX,o=t.translateY,a=[];mt(r)&&0!==r&&a.push("translateX(".concat(r,"px)")),mt(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),mt(e)&&0!==e&&a.push("rotate(".concat(e,"deg)")),mt(n)&&1!==n&&a.push("scaleX(".concat(n,")")),mt(i)&&1!==i&&a.push("scaleY(".concat(i,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function Kt(t){var n=e({},t),i=0;return St(t,(function(t,e){delete n[e],St(n,(function(e){var n=Math.abs(t.startX-e.startX),r=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),a=Math.abs(t.endY-e.endY),s=Math.sqrt(n*n+r*r),l=(Math.sqrt(o*o+a*a)-s)/s;Math.abs(l)>Math.abs(i)&&(i=l)}))})),i}function Xt(t,n){var i=t.pageX,r=t.pageY,o={endX:i,endY:r};return n?o:e({startX:i,startY:r},o)}function Jt(t){var e=0,n=0,i=0;return St(t,(function(t){var r=t.startX,o=t.startY;e+=r,n+=o,i+=1})),{pageX:e/=i,pageY:n/=i}}function Qt(t){var e=t.aspectRatio,n=t.height,i=t.width,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=gt(i),a=gt(n);if(o&&a){var s=n*e;"contain"===r&&s>i||"cover"===r&&s<i?n=i/e:i=n*e}else o?n=i/e:a&&(i=n*e);return{width:i,height:n}}function te(t){var e=t.width,n=t.height,i=t.degree;if(90==(i=Math.abs(i)%180))return{width:n,height:e};var r=i%90*Math.PI/180,o=Math.sin(r),a=Math.cos(r),s=e*a+n*o,l=e*o+n*a;return i>90?{width:l,height:s}:{width:s,height:l}}function ee(t,e,n,i){var r=e.aspectRatio,o=e.naturalWidth,a=e.naturalHeight,l=e.rotate,u=void 0===l?0:l,c=e.scaleX,h=void 0===c?1:c,d=e.scaleY,f=void 0===d?1:d,p=n.aspectRatio,m=n.naturalWidth,g=n.naturalHeight,v=i.fillColor,y=void 0===v?"transparent":v,b=i.imageSmoothingEnabled,_=void 0===b||b,w=i.imageSmoothingQuality,x=void 0===w?"low":w,k=i.maxWidth,S=void 0===k?1/0:k,C=i.maxHeight,T=void 0===C?1/0:C,O=i.minWidth,E=void 0===O?0:O,A=i.minHeight,L=void 0===A?0:A,M=document.createElement("canvas"),P=M.getContext("2d"),N=Qt({aspectRatio:p,width:S,height:T}),D=Qt({aspectRatio:p,width:E,height:L},"cover"),j=Math.min(N.width,Math.max(D.width,m)),I=Math.min(N.height,Math.max(D.height,g)),R=Qt({aspectRatio:r,width:S,height:T}),F=Qt({aspectRatio:r,width:E,height:L},"cover"),B=Math.min(R.width,Math.max(F.width,o)),z=Math.min(R.height,Math.max(F.height,a)),q=[-B/2,-z/2,B,z];return M.width=Ot(j),M.height=Ot(I),P.fillStyle=y,P.fillRect(0,0,j,I),P.save(),P.translate(j/2,I/2),P.rotate(u*Math.PI/180),P.scale(h,f),P.imageSmoothingEnabled=_,P.imageSmoothingQuality=x,P.drawImage.apply(P,[t].concat(s(q.map((function(t){return Math.floor(Ot(t))}))))),P.restore(),M}var ne=String.fromCharCode;function ie(t,e,n){var i="";n+=e;for(var r=e;r<n;r+=1)i+=ne(t.getUint8(r));return i}var re=/^data:.*,/;function oe(t){var e=t.replace(re,""),n=atob(e),i=new ArrayBuffer(n.length),r=new Uint8Array(i);return St(r,(function(t,e){r[e]=n.charCodeAt(e)})),i}function ae(t,e){for(var n=[],i=8192,r=new Uint8Array(t);r.length>0;)n.push(ne.apply(null,kt(r.subarray(0,i)))),r=r.subarray(i);return"data:".concat(e,";base64,").concat(btoa(n.join("")))}function se(t){var e,n=new DataView(t);try{var i,r,o;if(255===n.getUint8(0)&&216===n.getUint8(1))for(var a=n.byteLength,s=2;s+1<a;){if(255===n.getUint8(s)&&225===n.getUint8(s+1)){r=s;break}s+=1}if(r){var l=r+10;if("Exif"===ie(n,r+4,4)){var u=n.getUint16(l);if(((i=18761===u)||19789===u)&&42===n.getUint16(l+2,i)){var c=n.getUint32(l+4,i);c>=8&&(o=l+c)}}}if(o){var h,d,f=n.getUint16(o,i);for(d=0;d<f;d+=1)if(h=o+12*d+2,274===n.getUint16(h,i)){h+=8,e=n.getUint16(h,i),n.setUint16(h,1,i);break}}}catch(t){e=1}return e}function le(t){var e=0,n=1,i=1;switch(t){case 2:n=-1;break;case 3:e=-180;break;case 4:i=-1;break;case 5:e=90,i=-1;break;case 6:e=90;break;case 7:e=90,n=-1;break;case 8:e=-90}return{rotate:e,scaleX:n,scaleY:i}}var ue={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,n=this.container,i=this.cropper,r=Number(e.minContainerWidth),o=Number(e.minContainerHeight);Mt(i,D),Pt(t,D);var a={width:Math.max(n.offsetWidth,r>=0?r:ct),height:Math.max(n.offsetHeight,o>=0?o:ht)};this.containerData=a,At(i,{width:a.width,height:a.height}),Mt(t,D),Pt(i,D)},initCanvas:function(){var t=this.containerData,e=this.imageData,n=this.options.viewMode,i=Math.abs(e.rotate)%180==90,r=i?e.naturalHeight:e.naturalWidth,o=i?e.naturalWidth:e.naturalHeight,a=r/o,s=t.width,l=t.height;t.height*a>t.width?3===n?s=t.height*a:l=t.width/a:3===n?l=t.width/a:s=t.height*a;var u={aspectRatio:a,naturalWidth:r,naturalHeight:o,width:s,height:l};this.canvasData=u,this.limited=1===n||2===n,this.limitCanvas(!0,!0),u.width=Math.min(Math.max(u.width,u.minWidth),u.maxWidth),u.height=Math.min(Math.max(u.height,u.minHeight),u.maxHeight),u.left=(t.width-u.width)/2,u.top=(t.height-u.height)/2,u.oldLeft=u.left,u.oldTop=u.top,this.initialCanvasData=Ct({},u)},limitCanvas:function(t,e){var n=this.options,i=this.containerData,r=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=r.aspectRatio,l=this.cropped&&o;if(t){var u=Number(n.minCanvasWidth)||0,c=Number(n.minCanvasHeight)||0;a>1?(u=Math.max(u,i.width),c=Math.max(c,i.height),3===a&&(c*s>u?u=c*s:c=u/s)):a>0&&(u?u=Math.max(u,l?o.width:0):c?c=Math.max(c,l?o.height:0):l&&(u=o.width,(c=o.height)*s>u?u=c*s:c=u/s));var h=Qt({aspectRatio:s,width:u,height:c});u=h.width,c=h.height,r.minWidth=u,r.minHeight=c,r.maxWidth=1/0,r.maxHeight=1/0}if(e)if(a>(l?0:1)){var d=i.width-r.width,f=i.height-r.height;r.minLeft=Math.min(0,d),r.minTop=Math.min(0,f),r.maxLeft=Math.max(0,d),r.maxTop=Math.max(0,f),l&&this.limited&&(r.minLeft=Math.min(o.left,o.left+(o.width-r.width)),r.minTop=Math.min(o.top,o.top+(o.height-r.height)),r.maxLeft=o.left,r.maxTop=o.top,2===a&&(r.width>=i.width&&(r.minLeft=Math.min(0,d),r.maxLeft=Math.max(0,d)),r.height>=i.height&&(r.minTop=Math.min(0,f),r.maxTop=Math.max(0,f))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=i.width,r.maxTop=i.height},renderCanvas:function(t,e){var n=this.canvasData,i=this.imageData;if(e){var r=te({width:i.naturalWidth*Math.abs(i.scaleX||1),height:i.naturalHeight*Math.abs(i.scaleY||1),degree:i.rotate||0}),o=r.width,a=r.height,s=n.width*(o/n.naturalWidth),l=n.height*(a/n.naturalHeight);n.left-=(s-n.width)/2,n.top-=(l-n.height)/2,n.width=s,n.height=l,n.aspectRatio=o/a,n.naturalWidth=o,n.naturalHeight=a,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,At(this.canvas,Ct({width:n.width,height:n.height},Gt({translateX:n.left,translateY:n.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,n=this.imageData,i=n.naturalWidth*(e.width/e.naturalWidth),r=n.naturalHeight*(e.height/e.naturalHeight);Ct(n,{width:i,height:r,left:(e.width-i)/2,top:(e.height-r)/2}),At(this.image,Ct({width:n.width,height:n.height},Gt(Ct({translateX:n.left,translateY:n.top},n)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,n=t.aspectRatio||t.initialAspectRatio,i=Number(t.autoCropArea)||.8,r={width:e.width,height:e.height};n&&(e.height*n>e.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*i),r.height=Math.max(r.minHeight,r.height*i),r.left=e.left+(e.width-r.width)/2,r.top=e.top+(e.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=Ct({},r)},limitCropBox:function(t,e){var n=this.options,i=this.containerData,r=this.canvasData,o=this.cropBoxData,a=this.limited,s=n.aspectRatio;if(t){var l=Number(n.minCropBoxWidth)||0,u=Number(n.minCropBoxHeight)||0,c=a?Math.min(i.width,r.width,r.width+r.left,i.width-r.left):i.width,h=a?Math.min(i.height,r.height,r.height+r.top,i.height-r.top):i.height;l=Math.min(l,i.width),u=Math.min(u,i.height),s&&(l&&u?u*s>l?u=l/s:l=u*s:l?u=l/s:u&&(l=u*s),h*s>c?h=c/s:c=h*s),o.minWidth=Math.min(l,c),o.minHeight=Math.min(u,h),o.maxWidth=c,o.maxHeight=h}e&&(a?(o.minLeft=Math.max(0,r.left),o.minTop=Math.max(0,r.top),o.maxLeft=Math.min(i.width,r.left+r.width)-o.width,o.maxTop=Math.min(i.height,r.top+r.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=i.width-o.width,o.maxTop=i.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,t.movable&&t.cropBoxMovable&&Rt(this.face,B,n.width>=e.width&&n.height>=e.height?x:_),At(this.cropBox,Ct({width:n.width,height:n.height},Gt({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Wt(this.element,U,this.getData())}},ce={initPreview:function(){var t=this.element,e=this.crossOrigin,n=this.options.preview,i=e?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=i,o.alt=r,this.viewBox.appendChild(o),this.viewBoxImage=o,n){var a=n;"string"==typeof n?a=t.ownerDocument.querySelectorAll(n):n.querySelector&&(a=[n]),this.previews=a,St(a,(function(t){var n=document.createElement("img");Rt(t,z,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(n.crossOrigin=e),n.src=i,n.alt=r,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(n)}))}},resetPreview:function(){St(this.previews,(function(t){var e=It(t,z);At(t,{width:e.width,height:e.height}),t.innerHTML=e.html,Ft(t,z)}))},preview:function(){var t=this.imageData,e=this.canvasData,n=this.cropBoxData,i=n.width,r=n.height,o=t.width,a=t.height,s=n.left-e.left-t.left,l=n.top-e.top-t.top;this.cropped&&!this.disabled&&(At(this.viewBoxImage,Ct({width:o,height:a},Gt(Ct({translateX:-s,translateY:-l},t)))),St(this.previews,(function(e){var n=It(e,z),u=n.width,c=n.height,h=u,d=c,f=1;i&&(d=r*(f=u/i)),r&&d>c&&(h=i*(f=c/r),d=c),At(e,{width:h,height:d}),At(e.getElementsByTagName("img")[0],Ct({width:o*f,height:a*f},Gt(Ct({translateX:-s*f,translateY:-l*f},t))))})))}},he={bind:function(){var t=this.element,e=this.options,n=this.cropper;wt(e.cropstart)&&Ht(t,Y,e.cropstart),wt(e.cropmove)&&Ht(t,Z,e.cropmove),wt(e.cropend)&&Ht(t,V,e.cropend),wt(e.crop)&&Ht(t,U,e.crop),wt(e.zoom)&&Ht(t,rt,e.zoom),Ht(n,J,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Ht(n,it,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Ht(n,$,this.onDblclick=this.dblclick.bind(this)),Ht(t.ownerDocument,Q,this.onCropMove=this.cropMove.bind(this)),Ht(t.ownerDocument,tt,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Ht(window,nt,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,n=this.cropper;wt(e.cropstart)&&qt(t,Y,e.cropstart),wt(e.cropmove)&&qt(t,Z,e.cropmove),wt(e.cropend)&&qt(t,V,e.cropend),wt(e.crop)&&qt(t,U,e.crop),wt(e.zoom)&&qt(t,rt,e.zoom),qt(n,J,this.onCropStart),e.zoomable&&e.zoomOnWheel&&qt(n,it,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&qt(n,$,this.onDblclick),qt(t.ownerDocument,Q,this.onCropMove),qt(t.ownerDocument,tt,this.onCropEnd),e.responsive&&qt(window,nt,this.onResize)}},de={resize:function(){if(!this.disabled){var t,e,n=this.options,i=this.container,r=this.containerData,o=i.offsetWidth/r.width,a=i.offsetHeight/r.height,s=Math.abs(o-1)>Math.abs(a-1)?o:a;1!==s&&(n.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),n.restore&&(this.setCanvasData(St(t,(function(e,n){t[n]=e*s}))),this.setCropBoxData(St(e,(function(t,n){e[n]=t*s})))))}},dblclick:function(){this.disabled||this.options.dragMode===W||this.setDragMode(Lt(this.dragBox,P)?H:q)},wheel:function(t){var e=this,n=Number(this.options.wheelZoomRatio)||.1,i=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?i=t.deltaY>0?1:-1:t.wheelDelta?i=-t.wheelDelta/120:t.detail&&(i=t.detail>0?1:-1),this.zoom(-i*n,t)))},cropStart:function(t){var e=t.buttons,n=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(mt(e)&&1!==e||mt(n)&&0!==n||t.ctrlKey))){var i,r=this.options,o=this.pointers;t.changedTouches?St(t.changedTouches,(function(t){o[t.identifier]=Xt(t)})):o[t.pointerId||0]=Xt(t),i=Object.keys(o).length>1&&r.zoomable&&r.zoomOnTouch?k:It(t.target,B),at.test(i)&&!1!==Wt(this.element,Y,{originalEvent:t,action:i})&&(t.preventDefault(),this.action=i,this.cropping=!1,i===w&&(this.cropping=!0,Mt(this.dragBox,R)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var n=this.pointers;t.preventDefault(),!1!==Wt(this.element,Z,{originalEvent:t,action:e})&&(t.changedTouches?St(t.changedTouches,(function(t){Ct(n[t.identifier]||{},Xt(t,!0))})):Ct(n[t.pointerId||0]||{},Xt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,n=this.pointers;t.changedTouches?St(t.changedTouches,(function(t){delete n[t.identifier]})):delete n[t.pointerId||0],e&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,Nt(this.dragBox,R,this.cropped&&this.options.modal)),Wt(this.element,V,{originalEvent:t,action:e}))}}},fe={change:function(t){var e,n=this.options,i=this.canvasData,r=this.containerData,o=this.cropBoxData,a=this.pointers,s=this.action,l=n.aspectRatio,u=o.left,c=o.top,h=o.width,d=o.height,f=u+h,p=c+d,m=0,g=0,v=r.width,y=r.height,b=!0;!l&&t.shiftKey&&(l=h&&d?h/d:1),this.limited&&(m=o.minLeft,g=o.minTop,v=m+Math.min(r.width,i.width,i.left+i.width),y=g+Math.min(r.height,i.height,i.top+i.height));var P=a[Object.keys(a)[0]],N={x:P.endX-P.startX,y:P.endY-P.startY},j=function(t){switch(t){case S:f+N.x>v&&(N.x=v-f);break;case C:u+N.x<m&&(N.x=m-u);break;case O:c+N.y<g&&(N.y=g-c);break;case T:p+N.y>y&&(N.y=y-p)}};switch(s){case _:u+=N.x,c+=N.y;break;case S:if(N.x>=0&&(f>=v||l&&(c<=g||p>=y))){b=!1;break}j(S),(h+=N.x)<0&&(s=C,u-=h=-h),l&&(d=h/l,c+=(o.height-d)/2);break;case O:if(N.y<=0&&(c<=g||l&&(u<=m||f>=v))){b=!1;break}j(O),d-=N.y,c+=N.y,d<0&&(s=T,c-=d=-d),l&&(h=d*l,u+=(o.width-h)/2);break;case C:if(N.x<=0&&(u<=m||l&&(c<=g||p>=y))){b=!1;break}j(C),h-=N.x,u+=N.x,h<0&&(s=S,u-=h=-h),l&&(d=h/l,c+=(o.height-d)/2);break;case T:if(N.y>=0&&(p>=y||l&&(u<=m||f>=v))){b=!1;break}j(T),(d+=N.y)<0&&(s=O,c-=d=-d),l&&(h=d*l,u+=(o.width-h)/2);break;case E:if(l){if(N.y<=0&&(c<=g||f>=v)){b=!1;break}j(O),d-=N.y,c+=N.y,h=d*l}else j(O),j(S),N.x>=0?f<v?h+=N.x:N.y<=0&&c<=g&&(b=!1):h+=N.x,N.y<=0?c>g&&(d-=N.y,c+=N.y):(d-=N.y,c+=N.y);h<0&&d<0?(s=M,c-=d=-d,u-=h=-h):h<0?(s=A,u-=h=-h):d<0&&(s=L,c-=d=-d);break;case A:if(l){if(N.y<=0&&(c<=g||u<=m)){b=!1;break}j(O),d-=N.y,c+=N.y,h=d*l,u+=o.width-h}else j(O),j(C),N.x<=0?u>m?(h-=N.x,u+=N.x):N.y<=0&&c<=g&&(b=!1):(h-=N.x,u+=N.x),N.y<=0?c>g&&(d-=N.y,c+=N.y):(d-=N.y,c+=N.y);h<0&&d<0?(s=L,c-=d=-d,u-=h=-h):h<0?(s=E,u-=h=-h):d<0&&(s=M,c-=d=-d);break;case M:if(l){if(N.x<=0&&(u<=m||p>=y)){b=!1;break}j(C),h-=N.x,u+=N.x,d=h/l}else j(T),j(C),N.x<=0?u>m?(h-=N.x,u+=N.x):N.y>=0&&p>=y&&(b=!1):(h-=N.x,u+=N.x),N.y>=0?p<y&&(d+=N.y):d+=N.y;h<0&&d<0?(s=E,c-=d=-d,u-=h=-h):h<0?(s=L,u-=h=-h):d<0&&(s=A,c-=d=-d);break;case L:if(l){if(N.x>=0&&(f>=v||p>=y)){b=!1;break}j(S),d=(h+=N.x)/l}else j(T),j(S),N.x>=0?f<v?h+=N.x:N.y>=0&&p>=y&&(b=!1):h+=N.x,N.y>=0?p<y&&(d+=N.y):d+=N.y;h<0&&d<0?(s=A,c-=d=-d,u-=h=-h):h<0?(s=M,u-=h=-h):d<0&&(s=E,c-=d=-d);break;case x:this.move(N.x,N.y),b=!1;break;case k:this.zoom(Kt(a),t),b=!1;break;case w:if(!N.x||!N.y){b=!1;break}e=Ut(this.cropper),u=P.startX-e.left,c=P.startY-e.top,h=o.minWidth,d=o.minHeight,N.x>0?s=N.y>0?L:E:N.x<0&&(u-=h,s=N.y>0?M:A),N.y<0&&(c-=d),this.cropped||(Pt(this.cropBox,D),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}b&&(o.width=h,o.height=d,o.left=u,o.top=c,this.action=s,this.renderCropBox()),St(a,(function(t){t.startX=t.endX,t.startY=t.endY}))}},pe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Mt(this.dragBox,R),Pt(this.cropBox,D),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Ct({},this.initialImageData),this.canvasData=Ct({},this.initialCanvasData),this.cropBoxData=Ct({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Ct(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Pt(this.dragBox,R),Mt(this.cropBox,D)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,St(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Pt(this.cropper,N)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Mt(this.cropper,N)),this},destroy:function(){var t=this.element;return t[b]?(t[b]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,i=n.left,r=n.top;return this.moveTo(vt(t)?t:i+Number(t),vt(e)?e:r+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,i=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(mt(t)&&(n.left=t,i=!0),mt(e)&&(n.top=e,i=!0),i&&this.renderCanvas(!0)),this},zoom:function(t,e){var n=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(n.width*t/n.naturalWidth,null,e)},zoomTo:function(t,e,n){var i=this.options,r=this.canvasData,o=r.width,a=r.height,s=r.naturalWidth,l=r.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&i.zoomable){var u=s*t,c=l*t;if(!1===Wt(this.element,rt,{ratio:t,oldRatio:o/s,originalEvent:n}))return this;if(n){var h=this.pointers,d=Ut(this.cropper),f=h&&Object.keys(h).length?Jt(h):{pageX:n.pageX,pageY:n.pageY};r.left-=(u-o)*((f.pageX-d.left-r.left)/o),r.top-=(c-a)*((f.pageY-d.top-r.top)/a)}else _t(e)&&mt(e.x)&&mt(e.y)?(r.left-=(u-o)*((e.x-r.left)/o),r.top-=(c-a)*((e.y-r.top)/a)):(r.left-=(u-o)/2,r.top-=(c-a)/2);r.width=u,r.height=c,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return mt(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,mt(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(mt(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.imageData,i=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(mt(t)&&(n.scaleX=t,i=!0),mt(e)&&(n.scaleY=e,i=!0),i&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,i=this.imageData,r=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-r.left,y:o.top-r.top,width:o.width,height:o.height};var a=i.width/i.naturalWidth;if(St(t,(function(e,n){t[n]=e/a})),e){var s=Math.round(t.y+t.height),l=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=l-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return n.rotatable&&(t.rotate=i.rotate||0),n.scalable&&(t.scaleX=i.scaleX||1,t.scaleY=i.scaleY||1),t},setData:function(t){var e=this.options,n=this.imageData,i=this.canvasData,r={};if(this.ready&&!this.disabled&&_t(t)){var o=!1;e.rotatable&&mt(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,o=!0),e.scalable&&(mt(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,o=!0),mt(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var a=n.width/n.naturalWidth;mt(t.x)&&(r.left=t.x*a+i.left),mt(t.y)&&(r.top=t.y*a+i.top),mt(t.width)&&(r.width=t.width*a),mt(t.height)&&(r.height=t.height*a),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?Ct({},this.containerData):{}},getImageData:function(){return this.sized?Ct({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&St(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){e[n]=t[n]})),e},setCanvasData:function(t){var e=this.canvasData,n=e.aspectRatio;return this.ready&&!this.disabled&&_t(t)&&(mt(t.left)&&(e.left=t.left),mt(t.top)&&(e.top=t.top),mt(t.width)?(e.width=t.width,e.height=t.width/n):mt(t.height)&&(e.height=t.height,e.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,n,i=this.cropBoxData,r=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&_t(t)&&(mt(t.left)&&(i.left=t.left),mt(t.top)&&(i.top=t.top),mt(t.width)&&t.width!==i.width&&(e=!0,i.width=t.width),mt(t.height)&&t.height!==i.height&&(n=!0,i.height=t.height),r&&(e?i.height=i.width/r:n&&(i.width=i.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,n=ee(this.image,this.imageData,e,t);if(!this.cropped)return n;var i=this.getData(t.rounded),r=i.x,o=i.y,a=i.width,l=i.height,u=n.width/Math.floor(e.naturalWidth);1!==u&&(r*=u,o*=u,a*=u,l*=u);var c=a/l,h=Qt({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Qt({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),f=Qt({aspectRatio:c,width:t.width||(1!==u?n.width:a),height:t.height||(1!==u?n.height:l)}),p=f.width,m=f.height;p=Math.min(h.width,Math.max(d.width,p)),m=Math.min(h.height,Math.max(d.height,m));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=Ot(p),g.height=Ot(m),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,p,m);var y=t.imageSmoothingEnabled,b=void 0===y||y,_=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,_&&(v.imageSmoothingQuality=_);var w,x,k,S,C,T,O=n.width,E=n.height,A=r,L=o;A<=-a||A>O?(A=0,w=0,k=0,C=0):A<=0?(k=-A,A=0,C=w=Math.min(O,a+A)):A<=O&&(k=0,C=w=Math.min(a,O-A)),w<=0||L<=-l||L>E?(L=0,x=0,S=0,T=0):L<=0?(S=-L,L=0,T=x=Math.min(E,l+L)):L<=E&&(S=0,T=x=Math.min(l,E-L));var M=[A,L,w,x];if(C>0&&T>0){var P=p/a;M.push(k*P,S*P,C*P,T*P)}return v.drawImage.apply(v,[n].concat(s(M.map((function(t){return Math.floor(Ot(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||vt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,n=this.dragBox,i=this.face;if(this.ready&&!this.disabled){var r=t===q,o=e.movable&&t===H;t=r||o?t:W,e.dragMode=t,Rt(n,B,t),Nt(n,P,r),Nt(n,F,o),e.cropBoxMovable||(Rt(i,B,t),Nt(i,P,r),Nt(i,F,o))}return this}},me=g.Cropper,ge=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,t),!e||!ut.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=Ct({},dt,_t(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return o(t,[{key:"init",value:function(){var t,e=this.element,n=e.tagName.toLowerCase();if(!e[b]){if(e[b]=this,"img"===n){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===n&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var n=this.element,i=this.options;if(i.rotatable||i.scalable||(i.checkOrientation=!1),i.checkOrientation&&window.ArrayBuffer)if(st.test(t))lt.test(t)?this.read(oe(t)):this.clone();else{var r=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=r,r.onabort=o,r.onerror=o,r.ontimeout=o,r.onprogress=function(){r.getResponseHeader("content-type")!==ot&&r.abort()},r.onload=function(){e.read(r.response)},r.onloadend=function(){e.reloading=!1,e.xhr=null},i.checkCrossOrigin&&Yt(t)&&n.crossOrigin&&(t=$t(t)),r.open("GET",t,!0),r.responseType="arraybuffer",r.withCredentials="use-credentials"===n.crossOrigin,r.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,n=this.imageData,i=se(t),r=0,o=1,a=1;if(i>1){this.url=ae(t,ot);var s=le(i);r=s.rotate,o=s.scaleX,a=s.scaleY}e.rotatable&&(n.rotate=r),e.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,n=t.crossOrigin,i=e;this.options.checkCrossOrigin&&Yt(e)&&(n||(n="anonymous"),i=$t(e)),this.crossOrigin=n,this.crossOriginUrl=i;var r=document.createElement("img");n&&(r.crossOrigin=n),r.src=i||e,r.alt=t.alt||"The image to crop",this.image=r,r.onload=this.start.bind(this),r.onerror=this.stop.bind(this),Mt(r,j),t.parentNode.insertBefore(r,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var n=g.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(g.navigator.userAgent),i=function(e,n){Ct(t.imageData,{naturalWidth:e,naturalHeight:n,aspectRatio:e/n}),t.initialImageData=Ct({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||n){var r=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=r,r.onload=function(){i(r.width,r.height),n||o.removeChild(r)},r.src=e.src,n||(r.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(r))}else i(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,n=this.image,i=t.parentNode,r=document.createElement("div");r.innerHTML=ft;var o=r.querySelector(".".concat(b,"-container")),a=o.querySelector(".".concat(b,"-canvas")),s=o.querySelector(".".concat(b,"-drag-box")),l=o.querySelector(".".concat(b,"-crop-box")),u=l.querySelector(".".concat(b,"-face"));this.container=i,this.cropper=o,this.canvas=a,this.dragBox=s,this.cropBox=l,this.viewBox=o.querySelector(".".concat(b,"-view-box")),this.face=u,a.appendChild(n),Mt(t,D),i.insertBefore(o,t.nextSibling),Pt(n,j),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,Mt(l,D),e.guides||Mt(l.getElementsByClassName("".concat(b,"-dashed")),D),e.center||Mt(l.getElementsByClassName("".concat(b,"-center")),D),e.background&&Mt(o,"".concat(b,"-bg")),e.highlight||Mt(u,I),e.cropBoxMovable&&(Mt(u,F),Rt(u,B,_)),e.cropBoxResizable||(Mt(l.getElementsByClassName("".concat(b,"-line")),D),Mt(l.getElementsByClassName("".concat(b,"-point")),D)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),wt(e.ready)&&Ht(t,et,e.ready,{once:!0}),Wt(t,et)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),Pt(this.element,D)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=me,t}},{key:"setDefaults",value:function(t){Ct(dt,_t(t)&&t)}}]),t}();return Ct(ge.prototype,ue,ce,he,de,fe,pe),ge}()},2628:t=>{var e;self,e=function(){return function(){var t={3099:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},6077:function(t,e,n){var i=n(111);t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},1223:function(t,e,n){var i=n(5112),r=n(30),o=n(3070),a=i("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:r(null)}),t.exports=function(t){s[a][t]=!0}},1530:function(t,e,n){"use strict";var i=n(8710).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},5787:function(t){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},9670:function(t,e,n){var i=n(111);t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},4019:function(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:function(t,e,n){"use strict";var i,r=n(4019),o=n(9781),a=n(7854),s=n(111),l=n(6656),u=n(648),c=n(8880),h=n(1320),d=n(3070).f,f=n(9518),p=n(7674),m=n(5112),g=n(9711),v=a.Int8Array,y=v&&v.prototype,b=a.Uint8ClampedArray,_=b&&b.prototype,w=v&&f(v),x=y&&f(y),k=Object.prototype,S=k.isPrototypeOf,C=m("toStringTag"),T=g("TYPED_ARRAY_TAG"),O=r&&!!p&&"Opera"!==u(a.opera),E=!1,A={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L={BigInt64Array:8,BigUint64Array:8},M=function(t){if(!s(t))return!1;var e=u(t);return l(A,e)||l(L,e)};for(i in A)a[i]||(O=!1);if((!O||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},O))for(i in A)a[i]&&p(a[i],w);if((!O||!x||x===k)&&(x=w.prototype,O))for(i in A)a[i]&&p(a[i].prototype,x);if(O&&f(_)!==x&&p(_,x),o&&!l(x,C))for(i in E=!0,d(x,C,{get:function(){return s(this)?this[T]:void 0}}),A)a[i]&&c(a[i],T,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:O,TYPED_ARRAY_TAG:E&&T,aTypedArray:function(t){if(M(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(p){if(S.call(w,t))return t}else for(var e in A)if(l(A,i)){var n=a[e];if(n&&(t===n||S.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(o){if(n)for(var i in A){var r=a[i];r&&l(r.prototype,t)&&delete r.prototype[t]}x[t]&&!n||h(x,t,n?e:O&&y[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var i,r;if(o){if(p){if(n)for(i in A)(r=a[i])&&l(r,t)&&delete r[t];if(w[t]&&!n)return;try{return h(w,t,n?e:O&&v[t]||e)}catch(t){}}for(i in A)!(r=a[i])||r[t]&&!n||h(r,t,e)}},isView:function(t){if(!s(t))return!1;var e=u(t);return"DataView"===e||l(A,e)||l(L,e)},isTypedArray:M,TypedArray:w,TypedArrayPrototype:x}},3331:function(t,e,n){"use strict";var i=n(7854),r=n(9781),o=n(4019),a=n(8880),s=n(2248),l=n(7293),u=n(5787),c=n(9958),h=n(7466),d=n(7067),f=n(1179),p=n(9518),m=n(7674),g=n(8006).f,v=n(3070).f,y=n(1285),b=n(8003),_=n(9909),w=_.get,x=_.set,k="ArrayBuffer",S="DataView",C="prototype",T="Wrong index",O=i[k],E=O,A=i[S],L=A&&A[C],M=Object.prototype,P=i.RangeError,N=f.pack,D=f.unpack,j=function(t){return[255&t]},I=function(t){return[255&t,t>>8&255]},R=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},F=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},B=function(t){return N(t,23,4)},z=function(t){return N(t,52,8)},q=function(t,e){v(t[C],e,{get:function(){return w(this)[e]}})},H=function(t,e,n,i){var r=d(n),o=w(t);if(r+e>o.byteLength)throw P(T);var a=w(o.buffer).bytes,s=r+o.byteOffset,l=a.slice(s,s+e);return i?l:l.reverse()},W=function(t,e,n,i,r,o){var a=d(n),s=w(t);if(a+e>s.byteLength)throw P(T);for(var l=w(s.buffer).bytes,u=a+s.byteOffset,c=i(+r),h=0;h<e;h++)l[u+h]=c[o?h:e-h-1]};if(o){if(!l((function(){O(1)}))||!l((function(){new O(-1)}))||l((function(){return new O,new O(1.5),new O(NaN),O.name!=k}))){for(var U,V=(E=function(t){return u(this,E),new O(d(t))})[C]=O[C],Z=g(O),Y=0;Z.length>Y;)(U=Z[Y++])in E||a(E,U,O[U]);V.constructor=E}m&&p(L)!==M&&m(L,M);var $=new A(new E(2)),G=L.setInt8;$.setInt8(0,2147483648),$.setInt8(1,2147483649),!$.getInt8(0)&&$.getInt8(1)||s(L,{setInt8:function(t,e){G.call(this,t,e<<24>>24)},setUint8:function(t,e){G.call(this,t,e<<24>>24)}},{unsafe:!0})}else E=function(t){u(this,E,k);var e=d(t);x(this,{bytes:y.call(new Array(e),0),byteLength:e}),r||(this.byteLength=e)},A=function(t,e,n){u(this,A,S),u(t,E,S);var i=w(t).byteLength,o=c(e);if(o<0||o>i)throw P("Wrong offset");if(o+(n=void 0===n?i-o:h(n))>i)throw P("Wrong length");x(this,{buffer:t,byteLength:n,byteOffset:o}),r||(this.buffer=t,this.byteLength=n,this.byteOffset=o)},r&&(q(E,"byteLength"),q(A,"buffer"),q(A,"byteLength"),q(A,"byteOffset")),s(A[C],{getInt8:function(t){return H(this,1,t)[0]<<24>>24},getUint8:function(t){return H(this,1,t)[0]},getInt16:function(t){var e=H(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=H(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return F(H(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return F(H(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return D(H(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return D(H(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){W(this,1,t,j,e)},setUint8:function(t,e){W(this,1,t,j,e)},setInt16:function(t,e){W(this,2,t,I,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){W(this,2,t,I,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){W(this,4,t,R,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){W(this,4,t,R,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){W(this,4,t,B,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){W(this,8,t,z,e,arguments.length>2?arguments[2]:void 0)}});b(E,k),b(A,S),t.exports={ArrayBuffer:E,DataView:A}},1048:function(t,e,n){"use strict";var i=n(7908),r=n(1400),o=n(7466),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=i(this),s=o(n.length),l=r(t,s),u=r(e,s),c=arguments.length>2?arguments[2]:void 0,h=a((void 0===c?s:r(c,s))-u,s-l),d=1;for(u<l&&l<u+h&&(d=-1,u+=h-1,l+=h-1);h-- >0;)u in n?n[l]=n[u]:delete n[l],l+=d,u+=d;return n}},1285:function(t,e,n){"use strict";var i=n(7908),r=n(1400),o=n(7466);t.exports=function(t){for(var e=i(this),n=o(e.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,u=void 0===l?n:r(l,n);u>s;)e[s++]=t;return e}},8533:function(t,e,n){"use strict";var i=n(2092).forEach,r=n(9341)("forEach");t.exports=r?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},8457:function(t,e,n){"use strict";var i=n(9974),r=n(7908),o=n(3411),a=n(7659),s=n(7466),l=n(6135),u=n(1246);t.exports=function(t){var e,n,c,h,d,f,p=r(t),m="function"==typeof this?this:Array,g=arguments.length,v=g>1?arguments[1]:void 0,y=void 0!==v,b=u(p),_=0;if(y&&(v=i(v,g>2?arguments[2]:void 0,2)),null==b||m==Array&&a(b))for(n=new m(e=s(p.length));e>_;_++)f=y?v(p[_],_):p[_],l(n,_,f);else for(d=(h=b.call(p)).next,n=new m;!(c=d.call(h)).done;_++)f=y?o(h,v,[c.value,_],!0):c.value,l(n,_,f);return n.length=_,n}},1318:function(t,e,n){var i=n(5656),r=n(7466),o=n(1400),a=function(t){return function(e,n,a){var s,l=i(e),u=r(l.length),c=o(a,u);if(t&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:function(t,e,n){var i=n(9974),r=n(8361),o=n(7908),a=n(7466),s=n(5417),l=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,c=4==t,h=6==t,d=7==t,f=5==t||h;return function(p,m,g,v){for(var y,b,_=o(p),w=r(_),x=i(m,g,3),k=a(w.length),S=0,C=v||s,T=e?C(p,k):n||d?C(p,0):void 0;k>S;S++)if((f||S in w)&&(b=x(y=w[S],S,_),t))if(e)T[S]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:l.call(T,y)}else switch(t){case 4:return!1;case 7:l.call(T,y)}return h?-1:u||c?c:T}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},6583:function(t,e,n){"use strict";var i=n(5656),r=n(9958),o=n(7466),a=n(9341),s=Math.min,l=[].lastIndexOf,u=!!l&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf"),h=u||!c;t.exports=h?function(t){if(u)return l.apply(this,arguments)||0;var e=i(this),n=o(e.length),a=n-1;for(arguments.length>1&&(a=s(a,r(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:l},1194:function(t,e,n){var i=n(7293),r=n(5112),o=n(7392),a=r("species");t.exports=function(t){return o>=51||!i((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:function(t,e,n){"use strict";var i=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){throw 1},1)}))}},3671:function(t,e,n){var i=n(3099),r=n(7908),o=n(8361),a=n(7466),s=function(t){return function(e,n,s,l){i(n);var u=r(e),c=o(u),h=a(u.length),d=t?h-1:0,f=t?-1:1;if(s<2)for(;;){if(d in c){l=c[d],d+=f;break}if(d+=f,t?d<0:h<=d)throw TypeError("Reduce of empty array with no initial value")}for(;t?d>=0:h>d;d+=f)d in c&&(l=n(l,c[d],d,u));return l}};t.exports={left:s(!1),right:s(!0)}},5417:function(t,e,n){var i=n(111),r=n(3157),o=n(5112)("species");t.exports=function(t,e){var n;return r(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},3411:function(t,e,n){var i=n(9670),r=n(9212);t.exports=function(t,e,n,o){try{return o?e(i(n)[0],n[1]):e(n)}catch(e){throw r(t),e}}},7072:function(t,e,n){var i=n(5112)("iterator"),r=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){r=!0}};a[i]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o={};o[i]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},4326:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:function(t,e,n){var i=n(1694),r=n(4326),o=n(5112)("toStringTag"),a="Arguments"==r(function(){return arguments}());t.exports=i?r:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:a?r(e):"Object"==(i=r(e))&&"function"==typeof e.callee?"Arguments":i}},9920:function(t,e,n){var i=n(6656),r=n(3887),o=n(1236),a=n(3070);t.exports=function(t,e){for(var n=r(e),s=a.f,l=o.f,u=0;u<n.length;u++){var c=n[u];i(t,c)||s(t,c,l(e,c))}}},8544:function(t,e,n){var i=n(7293);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:function(t,e,n){"use strict";var i=n(3383).IteratorPrototype,r=n(30),o=n(9114),a=n(8003),s=n(7497),l=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=r(i,{next:o(1,n)}),a(t,u,!1,!0),s[u]=l,t}},8880:function(t,e,n){var i=n(9781),r=n(3070),o=n(9114);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:function(t,e,n){"use strict";var i=n(7593),r=n(3070),o=n(9114);t.exports=function(t,e,n){var a=i(e);a in t?r.f(t,a,o(0,n)):t[a]=n}},654:function(t,e,n){"use strict";var i=n(2109),r=n(4994),o=n(9518),a=n(7674),s=n(8003),l=n(8880),u=n(1320),c=n(5112),h=n(1913),d=n(7497),f=n(3383),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v="keys",y="values",b="entries",_=function(){return this};t.exports=function(t,e,n,c,f,w,x){r(n,e,c);var k,S,C,T=function(t){if(t===f&&M)return M;if(!m&&t in A)return A[t];switch(t){case v:case y:case b:return function(){return new n(this,t)}}return function(){return new n(this)}},O=e+" Iterator",E=!1,A=t.prototype,L=A[g]||A["@@iterator"]||f&&A[f],M=!m&&L||T(f),P="Array"==e&&A.entries||L;if(P&&(k=o(P.call(new t)),p!==Object.prototype&&k.next&&(h||o(k)===p||(a?a(k,p):"function"!=typeof k[g]&&l(k,g,_)),s(k,O,!0,!0),h&&(d[O]=_))),f==y&&L&&L.name!==y&&(E=!0,M=function(){return L.call(this)}),h&&!x||A[g]===M||l(A,g,M),d[e]=M,f)if(S={values:T(y),keys:w?M:T(v),entries:T(b)},x)for(C in S)(m||E||!(C in A))&&u(A,C,S[C]);else i({target:e,proto:!0,forced:m||E},S);return S}},9781:function(t,e,n){var i=n(7293);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(t,e,n){var i=n(7854),r=n(111),o=i.document,a=r(o)&&r(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},8324:function(t){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(t,e,n){var i=n(5005);t.exports=i("navigator","userAgent")||""},7392:function(t,e,n){var i,r,o=n(7854),a=n(8113),s=o.process,l=s&&s.versions,u=l&&l.v8;u?r=(i=u.split("."))[0]+i[1]:a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(r=i[1]),t.exports=r&&+r},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var i=n(7854),r=n(1236).f,o=n(8880),a=n(1320),s=n(3505),l=n(9920),u=n(4705);t.exports=function(t,e){var n,c,h,d,f,p=t.target,m=t.global,g=t.stat;if(n=m?i:g?i[p]||s(p,{}):(i[p]||{}).prototype)for(c in e){if(d=e[c],h=t.noTargetGet?(f=r(n,c))&&f.value:n[c],!u(m?c:p+(g?".":"#")+c,t.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(t.sham||h&&h.sham)&&o(d,"sham",!0),a(n,c,d,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:function(t,e,n){"use strict";n(4916);var i=n(1320),r=n(7293),o=n(5112),a=n(2261),s=n(8880),l=o("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),c="$0"==="a".replace(/./,"$0"),h=o("replace"),d=!!/./[h]&&""===/./[h]("a","$0"),f=!r((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,h){var p=o(t),m=!r((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),g=m&&!r((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!m||!g||"replace"===t&&(!u||!c||d)||"split"===t&&!f){var v=/./[p],y=n(p,""[t],(function(t,e,n,i,r){return e.exec===a?m&&!r?{done:!0,value:v.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),b=y[0],_=y[1];i(String.prototype,t,b),i(RegExp.prototype,p,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}h&&s(RegExp.prototype[p],"sham",!0)}},9974:function(t,e,n){var i=n(3099);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},5005:function(t,e,n){var i=n(857),r=n(7854),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(i[t])||o(r[t]):i[t]&&i[t][e]||r[t]&&r[t][e]}},1246:function(t,e,n){var i=n(648),r=n(7497),o=n(5112)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||r[i(t)]}},8554:function(t,e,n){var i=n(9670),r=n(1246);t.exports=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return i(e.call(t))}},647:function(t,e,n){var i=n(7908),r=Math.floor,o="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,s=/\$([$&'`]|\d\d?)/g;t.exports=function(t,e,n,l,u,c){var h=n+t.length,d=l.length,f=s;return void 0!==u&&(u=i(u),f=a),o.call(c,f,(function(i,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(h);case"<":a=u[o.slice(1,-1)];break;default:var s=+o;if(0===s)return i;if(s>d){var c=r(s/10);return 0===c?i:c<=d?void 0===l[c-1]?o.charAt(1):l[c-1]+o.charAt(1):i}a=l[s-1]}return void 0===a?"":a}))}},7854:function(t,e,n){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(t){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},3501:function(t){t.exports={}},490:function(t,e,n){var i=n(5005);t.exports=i("document","documentElement")},4664:function(t,e,n){var i=n(9781),r=n(7293),o=n(317);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:function(t){var e=Math.abs,n=Math.pow,i=Math.floor,r=Math.log,o=Math.LN2;t.exports={pack:function(t,a,s){var l,u,c,h=new Array(s),d=8*s-a-1,f=(1<<d)-1,p=f>>1,m=23===a?n(2,-24)-n(2,-77):0,g=t<0||0===t&&1/t<0?1:0,v=0;for((t=e(t))!=t||t===1/0?(u=t!=t?1:0,l=f):(l=i(r(t)/o),t*(c=n(2,-l))<1&&(l--,c*=2),(t+=l+p>=1?m/c:m*n(2,1-p))*c>=2&&(l++,c/=2),l+p>=f?(u=0,l=f):l+p>=1?(u=(t*c-1)*n(2,a),l+=p):(u=t*n(2,p-1)*n(2,a),l=0));a>=8;h[v++]=255&u,u/=256,a-=8);for(l=l<<a|u,d+=a;d>0;h[v++]=255&l,l/=256,d-=8);return h[--v]|=128*g,h},unpack:function(t,e){var i,r=t.length,o=8*r-e-1,a=(1<<o)-1,s=a>>1,l=o-7,u=r-1,c=t[u--],h=127&c;for(c>>=7;l>0;h=256*h+t[u],u--,l-=8);for(i=h&(1<<-l)-1,h>>=-l,l+=e;l>0;i=256*i+t[u],u--,l-=8);if(0===h)h=1-s;else{if(h===a)return i?NaN:c?-1/0:1/0;i+=n(2,e),h-=s}return(c?-1:1)*i*n(2,h-e)}}},8361:function(t,e,n){var i=n(7293),r=n(4326),o="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o.call(t,""):Object(t)}:Object},9587:function(t,e,n){var i=n(111),r=n(7674);t.exports=function(t,e,n){var o,a;return r&&"function"==typeof(o=e.constructor)&&o!==n&&i(a=o.prototype)&&a!==n.prototype&&r(t,a),t}},2788:function(t,e,n){var i=n(5465),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return r.call(t)}),t.exports=i.inspectSource},9909:function(t,e,n){var i,r,o,a=n(8536),s=n(7854),l=n(111),u=n(8880),c=n(6656),h=n(5465),d=n(6200),f=n(3501),p=s.WeakMap;if(a){var m=h.state||(h.state=new p),g=m.get,v=m.has,y=m.set;i=function(t,e){return e.facade=t,y.call(m,t,e),e},r=function(t){return g.call(m,t)||{}},o=function(t){return v.call(m,t)}}else{var b=d("state");f[b]=!0,i=function(t,e){return e.facade=t,u(t,b,e),e},r=function(t){return c(t,b)?t[b]:{}},o=function(t){return c(t,b)}}t.exports={set:i,get:r,has:o,enforce:function(t){return o(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},7659:function(t,e,n){var i=n(5112),r=n(7497),o=i("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[o]===t)}},3157:function(t,e,n){var i=n(4326);t.exports=Array.isArray||function(t){return"Array"==i(t)}},4705:function(t,e,n){var i=n(7293),r=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==u||n!=l&&("function"==typeof e?i(e):!!e)},a=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},111:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},1913:function(t){t.exports=!1},7850:function(t,e,n){var i=n(111),r=n(4326),o=n(5112)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==r(t))}},9212:function(t,e,n){var i=n(9670);t.exports=function(t){var e=t.return;if(void 0!==e)return i(e.call(t)).value}},3383:function(t,e,n){"use strict";var i,r,o,a=n(7293),s=n(9518),l=n(8880),u=n(6656),c=n(5112),h=n(1913),d=c("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(r=s(s(o)))!==Object.prototype&&(i=r):f=!0);var p=null==i||a((function(){var t={};return i[d].call(t)!==t}));p&&(i={}),h&&!p||u(i,d)||l(i,d,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}},7497:function(t){t.exports={}},133:function(t,e,n){var i=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},590:function(t,e,n){var i=n(7293),r=n(5112),o=n(1913),a=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,i){e.delete("b"),n+=i+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(t,e,n){var i=n(7854),r=n(2788),o=i.WeakMap;t.exports="function"==typeof o&&/native code/.test(r(o))},1574:function(t,e,n){"use strict";var i=n(9781),r=n(7293),o=n(1956),a=n(5181),s=n(5296),l=n(7908),u=n(8361),c=Object.assign,h=Object.defineProperty;t.exports=!c||r((function(){if(i&&1!==c({b:1},c(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||o(c({},e)).join("")!=r}))?function(t,e){for(var n=l(t),r=arguments.length,c=1,h=a.f,d=s.f;r>c;)for(var f,p=u(arguments[c++]),m=h?o(p).concat(h(p)):o(p),g=m.length,v=0;g>v;)f=m[v++],i&&!d.call(p,f)||(n[f]=p[f]);return n}:c},30:function(t,e,n){var i,r=n(9670),o=n(6048),a=n(748),s=n(3501),l=n(490),u=n(317),c=n(6200),h="prototype",d="script",f=c("IE_PROTO"),p=function(){},m=function(t){return"<"+d+">"+t+"</"+d+">"},g=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e,n;g=i?function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e}(i):(e=u("iframe"),n="java"+d+":",e.style.display="none",l.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F);for(var r=a.length;r--;)delete g[h][a[r]];return g()};s[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p[h]=r(t),n=new p,p[h]=null,n[f]=t):n=g(),void 0===e?n:o(n,e)}},6048:function(t,e,n){var i=n(9781),r=n(3070),o=n(9670),a=n(1956);t.exports=i?Object.defineProperties:function(t,e){o(t);for(var n,i=a(e),s=i.length,l=0;s>l;)r.f(t,n=i[l++],e[n]);return t}},3070:function(t,e,n){var i=n(9781),r=n(4664),o=n(9670),a=n(7593),s=Object.defineProperty;e.f=i?s:function(t,e,n){if(o(t),e=a(e,!0),o(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var i=n(9781),r=n(5296),o=n(9114),a=n(5656),s=n(7593),l=n(6656),u=n(4664),c=Object.getOwnPropertyDescriptor;e.f=i?c:function(t,e){if(t=a(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(l(t,e))return o(!r.f.call(t,e),t[e])}},8006:function(t,e,n){var i=n(6324),r=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},9518:function(t,e,n){var i=n(6656),r=n(7908),o=n(6200),a=n(8544),s=o("IE_PROTO"),l=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=r(t),i(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},6324:function(t,e,n){var i=n(6656),r=n(5656),o=n(1318).indexOf,a=n(3501);t.exports=function(t,e){var n,s=r(t),l=0,u=[];for(n in s)!i(a,n)&&i(s,n)&&u.push(n);for(;e.length>l;)i(s,n=e[l++])&&(~o(u,n)||u.push(n));return u}},1956:function(t,e,n){var i=n(6324),r=n(748);t.exports=Object.keys||function(t){return i(t,r)}},5296:function(t,e){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},7674:function(t,e,n){var i=n(9670),r=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return i(n),r(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},288:function(t,e,n){"use strict";var i=n(1694),r=n(648);t.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},3887:function(t,e,n){var i=n(5005),r=n(8006),o=n(5181),a=n(9670);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},857:function(t,e,n){var i=n(7854);t.exports=i},2248:function(t,e,n){var i=n(1320);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},1320:function(t,e,n){var i=n(7854),r=n(8880),o=n(6656),a=n(3505),s=n(2788),l=n(9909),u=l.get,c=l.enforce,h=String(String).split("String");(t.exports=function(t,e,n,s){var l,u=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||r(n,"name",e),(l=c(n)).source||(l.source=h.join("string"==typeof e?e:""))),t!==i?(u?!f&&t[e]&&(d=!0):delete t[e],d?t[e]=n:r(t,e,n)):d?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},7651:function(t,e,n){var i=n(4326),r=n(2261);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},2261:function(t,e,n){"use strict";var i,r,o=n(7066),a=n(2999),s=RegExp.prototype.exec,l=String.prototype.replace,u=s,c=(i=/a/,r=/b*/g,s.call(i,"a"),s.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),h=a.UNSUPPORTED_Y||a.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(c||d||h)&&(u=function(t){var e,n,i,r,a=this,u=h&&a.sticky,f=o.call(a),p=a.source,m=0,g=t;return u&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),g=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(p="(?: "+p+")",g=" "+g,m++),n=new RegExp("^(?:"+p+")",f)),d&&(n=new RegExp("^"+p+"$(?!\\s)",f)),c&&(e=a.lastIndex),i=s.call(u?n:a,g),u?i?(i.input=i.input.slice(m),i[0]=i[0].slice(m),i.index=a.lastIndex,a.lastIndex+=i[0].length):a.lastIndex=0:c&&i&&(a.lastIndex=a.global?i.index+i[0].length:e),d&&i&&i.length>1&&l.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),t.exports=u},7066:function(t,e,n){"use strict";var i=n(9670);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:function(t,e,n){"use strict";var i=n(7293);function r(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=i((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=i((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},4488:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:function(t,e,n){var i=n(7854),r=n(8880);t.exports=function(t,e){try{r(i,t,e)}catch(n){i[t]=e}return e}},6340:function(t,e,n){"use strict";var i=n(5005),r=n(3070),o=n(5112),a=n(9781),s=o("species");t.exports=function(t){var e=i(t),n=r.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},8003:function(t,e,n){var i=n(3070).f,r=n(6656),o=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},6200:function(t,e,n){var i=n(2309),r=n(9711),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},5465:function(t,e,n){var i=n(7854),r=n(3505),o="__core-js_shared__",a=i[o]||r(o,{});t.exports=a},2309:function(t,e,n){var i=n(1913),r=n(5465);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.0",mode:i?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(t,e,n){var i=n(9670),r=n(3099),o=n(5112)("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||null==(n=i(a)[o])?e:r(n)}},8710:function(t,e,n){var i=n(9958),r=n(4488),o=function(t){return function(e,n){var o,a,s=String(r(e)),l=i(n),u=s.length;return l<0||l>=u?t?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):o:t?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},3197:function(t){"use strict";var e=2147483647,n=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,r="Overflow: input needs wider integers to process",o=Math.floor,a=String.fromCharCode,s=function(t){return t+22+75*(t<26)},l=function(t,e,n){var i=0;for(t=n?o(t/700):t>>1,t+=o(t/e);t>455;i+=36)t=o(t/35);return o(i+36*t/(t+38))},u=function(t){var n=[];t=function(t){for(var e=[],n=0,i=t.length;n<i;){var r=t.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&r)<<10)+(1023&o)+65536):(e.push(r),n--)}else e.push(r)}return e}(t);var i,u,c=t.length,h=128,d=0,f=72;for(i=0;i<t.length;i++)(u=t[i])<128&&n.push(a(u));var p=n.length,m=p;for(p&&n.push("-");m<c;){var g=e;for(i=0;i<t.length;i++)(u=t[i])>=h&&u<g&&(g=u);var v=m+1;if(g-h>o((e-d)/v))throw RangeError(r);for(d+=(g-h)*v,h=g,i=0;i<t.length;i++){if((u=t[i])<h&&++d>e)throw RangeError(r);if(u==h){for(var y=d,b=36;;b+=36){var _=b<=f?1:b>=f+26?26:b-f;if(y<_)break;var w=y-_,x=36-_;n.push(a(s(_+w%x))),y=o(w/x)}n.push(a(s(y))),f=l(d,v,m==p),d=0,++m}}++d,++h}return n.join("")};t.exports=function(t){var e,r,o=[],a=t.toLowerCase().replace(i,".").split(".");for(e=0;e<a.length;e++)r=a[e],o.push(n.test(r)?"xn--"+u(r):r);return o.join(".")}},6091:function(t,e,n){var i=n(7293),r=n(1361);t.exports=function(t){return i((function(){return!!r[t]()||"​᠎"!="​᠎"[t]()||r[t].name!==t}))}},3111:function(t,e,n){var i=n(4488),r="["+n(1361)+"]",o=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),s=function(t){return function(e){var n=String(i(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},1400:function(t,e,n){var i=n(9958),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},7067:function(t,e,n){var i=n(9958),r=n(7466);t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw RangeError("Wrong length or index");return n}},5656:function(t,e,n){var i=n(8361),r=n(4488);t.exports=function(t){return i(r(t))}},9958:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},7466:function(t,e,n){var i=n(9958),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},7908:function(t,e,n){var i=n(4488);t.exports=function(t){return Object(i(t))}},4590:function(t,e,n){var i=n(3002);t.exports=function(t,e){var n=i(t);if(n%e)throw RangeError("Wrong offset");return n}},3002:function(t,e,n){var i=n(9958);t.exports=function(t){var e=i(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},7593:function(t,e,n){var i=n(111);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},1694:function(t,e,n){var i={};i[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(i)},9843:function(t,e,n){"use strict";var i=n(2109),r=n(7854),o=n(9781),a=n(3832),s=n(260),l=n(3331),u=n(5787),c=n(9114),h=n(8880),d=n(7466),f=n(7067),p=n(4590),m=n(7593),g=n(6656),v=n(648),y=n(111),b=n(30),_=n(7674),w=n(8006).f,x=n(7321),k=n(2092).forEach,S=n(6340),C=n(3070),T=n(1236),O=n(9909),E=n(9587),A=O.get,L=O.set,M=C.f,P=T.f,N=Math.round,D=r.RangeError,j=l.ArrayBuffer,I=l.DataView,R=s.NATIVE_ARRAY_BUFFER_VIEWS,F=s.TYPED_ARRAY_TAG,B=s.TypedArray,z=s.TypedArrayPrototype,q=s.aTypedArrayConstructor,H=s.isTypedArray,W="BYTES_PER_ELEMENT",U="Wrong length",V=function(t,e){for(var n=0,i=e.length,r=new(q(t))(i);i>n;)r[n]=e[n++];return r},Z=function(t,e){M(t,e,{get:function(){return A(this)[e]}})},Y=function(t){var e;return t instanceof j||"ArrayBuffer"==(e=v(t))||"SharedArrayBuffer"==e},$=function(t,e){return H(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},G=function(t,e){return $(t,e=m(e,!0))?c(2,t[e]):P(t,e)},K=function(t,e,n){return!($(t,e=m(e,!0))&&y(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?M(t,e,n):(t[e]=n.value,t)};o?(R||(T.f=G,C.f=K,Z(z,"buffer"),Z(z,"byteOffset"),Z(z,"byteLength"),Z(z,"length")),i({target:"Object",stat:!0,forced:!R},{getOwnPropertyDescriptor:G,defineProperty:K}),t.exports=function(t,e,n){var o=t.match(/\d+$/)[0]/8,s=t+(n?"Clamped":"")+"Array",l="get"+t,c="set"+t,m=r[s],g=m,v=g&&g.prototype,C={},T=function(t,e){M(t,e,{get:function(){return function(t,e){var n=A(t);return n.view[l](e*o+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var r=A(t);n&&(i=(i=N(i))<0?0:i>255?255:255&i),r.view[c](e*o+r.byteOffset,i,!0)}(this,e,t)},enumerable:!0})};R?a&&(g=e((function(t,e,n,i){return u(t,g,s),E(y(e)?Y(e)?void 0!==i?new m(e,p(n,o),i):void 0!==n?new m(e,p(n,o)):new m(e):H(e)?V(g,e):x.call(g,e):new m(f(e)),t,g)})),_&&_(g,B),k(w(m),(function(t){t in g||h(g,t,m[t])})),g.prototype=v):(g=e((function(t,e,n,i){u(t,g,s);var r,a,l,c=0,h=0;if(y(e)){if(!Y(e))return H(e)?V(g,e):x.call(g,e);r=e,h=p(n,o);var m=e.byteLength;if(void 0===i){if(m%o)throw D(U);if((a=m-h)<0)throw D(U)}else if((a=d(i)*o)+h>m)throw D(U);l=a/o}else l=f(e),r=new j(a=l*o);for(L(t,{buffer:r,byteOffset:h,byteLength:a,length:l,view:new I(r)});c<l;)T(t,c++)})),_&&_(g,B),v=g.prototype=b(z)),v.constructor!==g&&h(v,"constructor",g),F&&h(v,F,s),C[s]=g,i({global:!0,forced:g!=m,sham:!R},C),W in g||h(g,W,o),W in v||h(v,W,o),S(s)}):t.exports=function(){}},3832:function(t,e,n){var i=n(7854),r=n(7293),o=n(7072),a=n(260).NATIVE_ARRAY_BUFFER_VIEWS,s=i.ArrayBuffer,l=i.Int8Array;t.exports=!a||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!o((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||r((function(){return 1!==new l(new s(2),1,void 0).length}))},3074:function(t,e,n){var i=n(260).aTypedArrayConstructor,r=n(6707);t.exports=function(t,e){for(var n=r(t,t.constructor),o=0,a=e.length,s=new(i(n))(a);a>o;)s[o]=e[o++];return s}},7321:function(t,e,n){var i=n(7908),r=n(7466),o=n(1246),a=n(7659),s=n(9974),l=n(260).aTypedArrayConstructor;t.exports=function(t){var e,n,u,c,h,d,f=i(t),p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=o(f);if(null!=v&&!a(v))for(d=(h=v.call(f)).next,f=[];!(c=d.call(h)).done;)f.push(c.value);for(g&&p>2&&(m=s(m,arguments[2],2)),n=r(f.length),u=new(l(this))(n),e=0;n>e;e++)u[e]=g?m(f[e],e):f[e];return u}},9711:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},3307:function(t,e,n){var i=n(133);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:function(t,e,n){var i=n(7854),r=n(2309),o=n(6656),a=n(9711),s=n(133),l=n(3307),u=r("wks"),c=i.Symbol,h=l?c:c&&c.withoutSetter||a;t.exports=function(t){return o(u,t)||(s&&o(c,t)?u[t]=c[t]:u[t]=h("Symbol."+t)),u[t]}},1361:function(t){t.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},8264:function(t,e,n){"use strict";var i=n(2109),r=n(7854),o=n(3331),a=n(6340),s="ArrayBuffer",l=o[s];i({global:!0,forced:r[s]!==l},{ArrayBuffer:l}),a(s)},2222:function(t,e,n){"use strict";var i=n(2109),r=n(7293),o=n(3157),a=n(111),s=n(7908),l=n(7466),u=n(6135),c=n(5417),h=n(1194),d=n(5112),f=n(7392),p=d("isConcatSpreadable"),m=9007199254740991,g="Maximum allowed index exceeded",v=f>=51||!r((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),y=h("concat"),b=function(t){if(!a(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)};i({target:"Array",proto:!0,forced:!v||!y},{concat:function(t){var e,n,i,r,o,a=s(this),h=c(a,0),d=0;for(e=-1,i=arguments.length;e<i;e++)if(b(o=-1===e?a:arguments[e])){if(d+(r=l(o.length))>m)throw TypeError(g);for(n=0;n<r;n++,d++)n in o&&u(h,d,o[n])}else{if(d>=m)throw TypeError(g);u(h,d++,o)}return h.length=d,h}})},7327:function(t,e,n){"use strict";var i=n(2109),r=n(2092).filter;i({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},2772:function(t,e,n){"use strict";var i=n(2109),r=n(1318).indexOf,o=n(9341),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,l=o("indexOf");i({target:"Array",proto:!0,forced:s||!l},{indexOf:function(t){return s?a.apply(this,arguments)||0:r(this,t,arguments.length>1?arguments[1]:void 0)}})},6992:function(t,e,n){"use strict";var i=n(5656),r=n(1223),o=n(7497),a=n(9909),s=n(654),l="Array Iterator",u=a.set,c=a.getterFor(l);t.exports=s(Array,"Array",(function(t,e){u(this,{type:l,target:i(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},1249:function(t,e,n){"use strict";var i=n(2109),r=n(2092).map;i({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},7042:function(t,e,n){"use strict";var i=n(2109),r=n(111),o=n(3157),a=n(1400),s=n(7466),l=n(5656),u=n(6135),c=n(5112),h=n(1194)("slice"),d=c("species"),f=[].slice,p=Math.max;i({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var n,i,c,h=l(this),m=s(h.length),g=a(t,m),v=a(void 0===e?m:e,m);if(o(h)&&("function"!=typeof(n=h.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[d])&&(n=void 0):n=void 0,n===Array||void 0===n))return f.call(h,g,v);for(i=new(void 0===n?Array:n)(p(v-g,0)),c=0;g<v;g++,c++)g in h&&u(i,c,h[g]);return i.length=c,i}})},561:function(t,e,n){"use strict";var i=n(2109),r=n(1400),o=n(9958),a=n(7466),s=n(7908),l=n(5417),u=n(6135),c=n(1194)("splice"),h=Math.max,d=Math.min;i({target:"Array",proto:!0,forced:!c},{splice:function(t,e){var n,i,c,f,p,m,g=s(this),v=a(g.length),y=r(t,v),b=arguments.length;if(0===b?n=i=0:1===b?(n=0,i=v-y):(n=b-2,i=d(h(o(e),0),v-y)),v+n-i>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=l(g,i),f=0;f<i;f++)(p=y+f)in g&&u(c,f,g[p]);if(c.length=i,n<i){for(f=y;f<v-i;f++)m=f+n,(p=f+i)in g?g[m]=g[p]:delete g[m];for(f=v;f>v-i+n;f--)delete g[f-1]}else if(n>i)for(f=v-i;f>y;f--)m=f+n-1,(p=f+i-1)in g?g[m]=g[p]:delete g[m];for(f=0;f<n;f++)g[f+y]=arguments[f+2];return g.length=v-i+n,c}})},8309:function(t,e,n){var i=n(9781),r=n(3070).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/,l="name";i&&!(l in o)&&r(o,l,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(t){return""}}})},489:function(t,e,n){var i=n(2109),r=n(7293),o=n(7908),a=n(9518),s=n(8544);i({target:"Object",stat:!0,forced:r((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},1539:function(t,e,n){var i=n(1694),r=n(1320),o=n(288);i||r(Object.prototype,"toString",o,{unsafe:!0})},4916:function(t,e,n){"use strict";var i=n(2109),r=n(2261);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},9714:function(t,e,n){"use strict";var i=n(1320),r=n(9670),o=n(7293),a=n(7066),s="toString",l=RegExp.prototype,u=l[s],c=o((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),h=u.name!=s;(c||h)&&i(RegExp.prototype,s,(function(){var t=r(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in l)?a.call(t):n)}),{unsafe:!0})},8783:function(t,e,n){"use strict";var i=n(8710).charAt,r=n(9909),o=n(654),a="String Iterator",s=r.set,l=r.getterFor(a);o(String,"String",(function(t){s(this,{type:a,string:String(t),index:0})}),(function(){var t,e=l(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=i(n,r),e.index+=t.length,{value:t,done:!1})}))},4723:function(t,e,n){"use strict";var i=n(7007),r=n(9670),o=n(7466),a=n(4488),s=n(1530),l=n(7651);i("match",1,(function(t,e,n){return[function(e){var n=a(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,n):new RegExp(e)[t](String(n))},function(t){var i=n(e,t,this);if(i.done)return i.value;var a=r(t),u=String(this);if(!a.global)return l(a,u);var c=a.unicode;a.lastIndex=0;for(var h,d=[],f=0;null!==(h=l(a,u));){var p=String(h[0]);d[f]=p,""===p&&(a.lastIndex=s(u,o(a.lastIndex),c)),f++}return 0===f?null:d}]}))},5306:function(t,e,n){"use strict";var i=n(7007),r=n(9670),o=n(7466),a=n(9958),s=n(4488),l=n(1530),u=n(647),c=n(7651),h=Math.max,d=Math.min;i("replace",2,(function(t,e,n,i){var f=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,p=i.REPLACE_KEEPS_$0,m=f?"$":"$0";return[function(n,i){var r=s(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r,i):e.call(String(r),n,i)},function(t,i){if(!f&&p||"string"==typeof i&&-1===i.indexOf(m)){var s=n(e,t,this,i);if(s.done)return s.value}var g=r(t),v=String(this),y="function"==typeof i;y||(i=String(i));var b=g.global;if(b){var _=g.unicode;g.lastIndex=0}for(var w=[];;){var x=c(g,v);if(null===x)break;if(w.push(x),!b)break;""===String(x[0])&&(g.lastIndex=l(v,o(g.lastIndex),_))}for(var k,S="",C=0,T=0;T<w.length;T++){x=w[T];for(var O=String(x[0]),E=h(d(a(x.index),v.length),0),A=[],L=1;L<x.length;L++)A.push(void 0===(k=x[L])?k:String(k));var M=x.groups;if(y){var P=[O].concat(A,E,v);void 0!==M&&P.push(M);var N=String(i.apply(void 0,P))}else N=u(O,v,E,A,M,i);E>=C&&(S+=v.slice(C,E)+N,C=E+O.length)}return S+v.slice(C)}]}))},3123:function(t,e,n){"use strict";var i=n(7007),r=n(7850),o=n(9670),a=n(4488),s=n(6707),l=n(1530),u=n(7466),c=n(7651),h=n(2261),d=n(7293),f=[].push,p=Math.min,m=4294967295,g=!d((function(){return!RegExp(m,"y")}));i("split",2,(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=String(a(this)),o=void 0===n?m:n>>>0;if(0===o)return[];if(void 0===t)return[i];if(!r(t))return e.call(i,t,o);for(var s,l,u,c=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,g=new RegExp(t.source,d+"g");(s=h.call(g,i))&&!((l=g.lastIndex)>p&&(c.push(i.slice(p,s.index)),s.length>1&&s.index<i.length&&f.apply(c,s.slice(1)),u=s[0].length,p=l,c.length>=o));)g.lastIndex===s.index&&g.lastIndex++;return p===i.length?!u&&g.test("")||c.push(""):c.push(i.slice(p)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var r=a(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,r,n):i.call(String(r),e,n)},function(t,r){var a=n(i,t,this,r,i!==e);if(a.done)return a.value;var h=o(t),d=String(this),f=s(h,RegExp),v=h.unicode,y=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(g?"y":"g"),b=new f(g?h:"^(?:"+h.source+")",y),_=void 0===r?m:r>>>0;if(0===_)return[];if(0===d.length)return null===c(b,d)?[d]:[];for(var w=0,x=0,k=[];x<d.length;){b.lastIndex=g?x:0;var S,C=c(b,g?d:d.slice(x));if(null===C||(S=p(u(b.lastIndex+(g?0:x)),d.length))===w)x=l(d,x,v);else{if(k.push(d.slice(w,x)),k.length===_)return k;for(var T=1;T<=C.length-1;T++)if(k.push(C[T]),k.length===_)return k;x=w=S}}return k.push(d.slice(w)),k}]}),!g)},3210:function(t,e,n){"use strict";var i=n(2109),r=n(3111).trim;i({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return r(this)}})},2990:function(t,e,n){"use strict";var i=n(260),r=n(1048),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,e){return r.call(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},8927:function(t,e,n){"use strict";var i=n(260),r=n(2092).every,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},3105:function(t,e,n){"use strict";var i=n(260),r=n(1285),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("fill",(function(t){return r.apply(o(this),arguments)}))},5035:function(t,e,n){"use strict";var i=n(260),r=n(2092).filter,o=n(3074),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("filter",(function(t){var e=r(a(this),t,arguments.length>1?arguments[1]:void 0);return o(this,e)}))},7174:function(t,e,n){"use strict";var i=n(260),r=n(2092).findIndex,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},4345:function(t,e,n){"use strict";var i=n(260),r=n(2092).find,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},2846:function(t,e,n){"use strict";var i=n(260),r=n(2092).forEach,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function(t){r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},4731:function(t,e,n){"use strict";var i=n(260),r=n(1318).includes,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},7209:function(t,e,n){"use strict";var i=n(260),r=n(1318).indexOf,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6319:function(t,e,n){"use strict";var i=n(7854),r=n(260),o=n(6992),a=n(5112)("iterator"),s=i.Uint8Array,l=o.values,u=o.keys,c=o.entries,h=r.aTypedArray,d=r.exportTypedArrayMethod,f=s&&s.prototype[a],p=!!f&&("values"==f.name||null==f.name),m=function(){return l.call(h(this))};d("entries",(function(){return c.call(h(this))})),d("keys",(function(){return u.call(h(this))})),d("values",m,!p),d(a,m,!p)},8867:function(t,e,n){"use strict";var i=n(260),r=i.aTypedArray,o=i.exportTypedArrayMethod,a=[].join;o("join",(function(t){return a.apply(r(this),arguments)}))},7789:function(t,e,n){"use strict";var i=n(260),r=n(6583),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function(t){return r.apply(o(this),arguments)}))},3739:function(t,e,n){"use strict";var i=n(260),r=n(2092).map,o=n(6707),a=i.aTypedArray,s=i.aTypedArrayConstructor;(0,i.exportTypedArrayMethod)("map",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(s(o(t,t.constructor)))(e)}))}))},4483:function(t,e,n){"use strict";var i=n(260),r=n(3671).right,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function(t){return r(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},9368:function(t,e,n){"use strict";var i=n(260),r=n(3671).left,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function(t){return r(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},2056:function(t,e,n){"use strict";var i=n(260),r=i.aTypedArray,o=i.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var t,e=this,n=r(e).length,i=a(n/2),o=0;o<i;)t=e[o],e[o++]=e[--n],e[n]=t;return e}))},3462:function(t,e,n){"use strict";var i=n(260),r=n(7466),o=n(4590),a=n(7908),s=n(7293),l=i.aTypedArray;(0,i.exportTypedArrayMethod)("set",(function(t){l(this);var e=o(arguments.length>1?arguments[1]:void 0,1),n=this.length,i=a(t),s=r(i.length),u=0;if(s+e>n)throw RangeError("Wrong length");for(;u<s;)this[e+u]=i[u++]}),s((function(){new Int8Array(1).set({})})))},678:function(t,e,n){"use strict";var i=n(260),r=n(6707),o=n(7293),a=i.aTypedArray,s=i.aTypedArrayConstructor,l=i.exportTypedArrayMethod,u=[].slice;l("slice",(function(t,e){for(var n=u.call(a(this),t,e),i=r(this,this.constructor),o=0,l=n.length,c=new(s(i))(l);l>o;)c[o]=n[o++];return c}),o((function(){new Int8Array(1).slice()})))},7462:function(t,e,n){"use strict";var i=n(260),r=n(2092).some,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},3824:function(t,e,n){"use strict";var i=n(260),r=i.aTypedArray,o=i.exportTypedArrayMethod,a=[].sort;o("sort",(function(t){return a.call(r(this),t)}))},5021:function(t,e,n){"use strict";var i=n(260),r=n(7466),o=n(1400),a=n(6707),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("subarray",(function(t,e){var n=s(this),i=n.length,l=o(t,i);return new(a(n,n.constructor))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,r((void 0===e?i:o(e,i))-l))}))},2974:function(t,e,n){"use strict";var i=n(7854),r=n(260),o=n(7293),a=i.Int8Array,s=r.aTypedArray,l=r.exportTypedArrayMethod,u=[].toLocaleString,c=[].slice,h=!!a&&o((function(){u.call(new a(1))}));l("toLocaleString",(function(){return u.apply(h?c.call(s(this)):s(this),arguments)}),o((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!o((function(){a.prototype.toLocaleString.call([1,2])})))},5016:function(t,e,n){"use strict";var i=n(260).exportTypedArrayMethod,r=n(7293),o=n(7854).Uint8Array,a=o&&o.prototype||{},s=[].toString,l=[].join;r((function(){s.call({})}))&&(s=function(){return l.call(this)});var u=a.toString!=s;i("toString",s,u)},2472:function(t,e,n){n(9843)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},4747:function(t,e,n){var i=n(7854),r=n(8324),o=n(8533),a=n(8880);for(var s in r){var l=i[s],u=l&&l.prototype;if(u&&u.forEach!==o)try{a(u,"forEach",o)}catch(t){u.forEach=o}}},3948:function(t,e,n){var i=n(7854),r=n(8324),o=n(6992),a=n(8880),s=n(5112),l=s("iterator"),u=s("toStringTag"),c=o.values;for(var h in r){var d=i[h],f=d&&d.prototype;if(f){if(f[l]!==c)try{a(f,l,c)}catch(t){f[l]=c}if(f[u]||a(f,u,h),r[h])for(var p in o)if(f[p]!==o[p])try{a(f,p,o[p])}catch(t){f[p]=o[p]}}}},1637:function(t,e,n){"use strict";n(6992);var i=n(2109),r=n(5005),o=n(590),a=n(1320),s=n(2248),l=n(8003),u=n(4994),c=n(9909),h=n(5787),d=n(6656),f=n(9974),p=n(648),m=n(9670),g=n(111),v=n(30),y=n(9114),b=n(8554),_=n(1246),w=n(5112),x=r("fetch"),k=r("Headers"),S=w("iterator"),C="URLSearchParams",T=C+"Iterator",O=c.set,E=c.getterFor(C),A=c.getterFor(T),L=/\+/g,M=Array(4),P=function(t){return M[t-1]||(M[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},N=function(t){try{return decodeURIComponent(t)}catch(e){return t}},D=function(t){var e=t.replace(L," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(P(n--),N);return e}},j=/[!'()~]|%20/g,I={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},R=function(t){return I[t]},F=function(t){return encodeURIComponent(t).replace(j,R)},B=function(t,e){if(e)for(var n,i,r=e.split("&"),o=0;o<r.length;)(n=r[o++]).length&&(i=n.split("="),t.push({key:D(i.shift()),value:D(i.join("="))}))},z=function(t){this.entries.length=0,B(this.entries,t)},q=function(t,e){if(t<e)throw TypeError("Not enough arguments")},H=u((function(t,e){O(this,{type:T,iterator:b(E(t).entries),kind:e})}),"Iterator",(function(){var t=A(this),e=t.kind,n=t.iterator.next(),i=n.value;return n.done||(n.value="keys"===e?i.key:"values"===e?i.value:[i.key,i.value]),n})),W=function(){h(this,W,C);var t,e,n,i,r,o,a,s,l,u=arguments.length>0?arguments[0]:void 0,c=[];if(O(this,{type:C,entries:c,updateURL:function(){},updateSearchParams:z}),void 0!==u)if(g(u))if("function"==typeof(t=_(u)))for(n=(e=t.call(u)).next;!(i=n.call(e)).done;){if((a=(o=(r=b(m(i.value))).next).call(r)).done||(s=o.call(r)).done||!o.call(r).done)throw TypeError("Expected sequence with length 2");c.push({key:a.value+"",value:s.value+""})}else for(l in u)d(u,l)&&c.push({key:l,value:u[l]+""});else B(c,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},U=W.prototype;s(U,{append:function(t,e){q(arguments.length,2);var n=E(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){q(arguments.length,1);for(var e=E(this),n=e.entries,i=t+"",r=0;r<n.length;)n[r].key===i?n.splice(r,1):r++;e.updateURL()},get:function(t){q(arguments.length,1);for(var e=E(this).entries,n=t+"",i=0;i<e.length;i++)if(e[i].key===n)return e[i].value;return null},getAll:function(t){q(arguments.length,1);for(var e=E(this).entries,n=t+"",i=[],r=0;r<e.length;r++)e[r].key===n&&i.push(e[r].value);return i},has:function(t){q(arguments.length,1);for(var e=E(this).entries,n=t+"",i=0;i<e.length;)if(e[i++].key===n)return!0;return!1},set:function(t,e){q(arguments.length,1);for(var n,i=E(this),r=i.entries,o=!1,a=t+"",s=e+"",l=0;l<r.length;l++)(n=r[l]).key===a&&(o?r.splice(l--,1):(o=!0,n.value=s));o||r.push({key:a,value:s}),i.updateURL()},sort:function(){var t,e,n,i=E(this),r=i.entries,o=r.slice();for(r.length=0,n=0;n<o.length;n++){for(t=o[n],e=0;e<n;e++)if(r[e].key>t.key){r.splice(e,0,t);break}e===n&&r.push(t)}i.updateURL()},forEach:function(t){for(var e,n=E(this).entries,i=f(t,arguments.length>1?arguments[1]:void 0,3),r=0;r<n.length;)i((e=n[r++]).value,e.key,this)},keys:function(){return new H(this,"keys")},values:function(){return new H(this,"values")},entries:function(){return new H(this,"entries")}},{enumerable:!0}),a(U,S,U.entries),a(U,"toString",(function(){for(var t,e=E(this).entries,n=[],i=0;i<e.length;)t=e[i++],n.push(F(t.key)+"="+F(t.value));return n.join("&")}),{enumerable:!0}),l(W,C),i({global:!0,forced:!o},{URLSearchParams:W}),o||"function"!=typeof x||"function"!=typeof k||i({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,i,r=[t];return arguments.length>1&&(g(e=arguments[1])&&(n=e.body,p(n)===C&&((i=e.headers?new k(e.headers):new k).has("content-type")||i.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=v(e,{body:y(0,String(n)),headers:y(0,i)}))),r.push(e)),x.apply(this,r)}}),t.exports={URLSearchParams:W,getState:E}},285:function(t,e,n){"use strict";n(8783);var i,r=n(2109),o=n(9781),a=n(590),s=n(7854),l=n(6048),u=n(1320),c=n(5787),h=n(6656),d=n(1574),f=n(8457),p=n(8710).codeAt,m=n(3197),g=n(8003),v=n(1637),y=n(9909),b=s.URL,_=v.URLSearchParams,w=v.getState,x=y.set,k=y.getterFor("URL"),S=Math.floor,C=Math.pow,T="Invalid scheme",O="Invalid host",E="Invalid port",A=/[A-Za-z]/,L=/[\d+-.A-Za-z]/,M=/\d/,P=/^(0x|0X)/,N=/^[0-7]+$/,D=/^\d+$/,j=/^[\dA-Fa-f]+$/,I=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,R=/[\u0000\t\u000A\u000D #/:?@[\\]]/,F=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\t\u000A\u000D]/g,z=function(t,e){var n,i,r;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return O;if(!(n=H(e.slice(1,-1))))return O;t.host=n}else if(K(t)){if(e=m(e),I.test(e))return O;if(null===(n=q(e)))return O;t.host=n}else{if(R.test(e))return O;for(n="",i=f(e),r=0;r<i.length;r++)n+=$(i[r],U);t.host=n}},q=function(t){var e,n,i,r,o,a,s,l=t.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(e=l.length)>4)return t;for(n=[],i=0;i<e;i++){if(""==(r=l[i]))return t;if(o=10,r.length>1&&"0"==r.charAt(0)&&(o=P.test(r)?16:8,r=r.slice(8==o?1:2)),""===r)a=0;else{if(!(10==o?D:8==o?N:j).test(r))return t;a=parseInt(r,o)}n.push(a)}for(i=0;i<e;i++)if(a=n[i],i==e-1){if(a>=C(256,5-e))return null}else if(a>255)return null;for(s=n.pop(),i=0;i<n.length;i++)s+=n[i]*C(256,3-i);return s},H=function(t){var e,n,i,r,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,h=0,d=function(){return t.charAt(h)};if(":"==d()){if(":"!=t.charAt(1))return;h+=2,c=++u}for(;d();){if(8==u)return;if(":"!=d()){for(e=n=0;n<4&&j.test(d());)e=16*e+parseInt(d(),16),h++,n++;if("."==d()){if(0==n)return;if(h-=n,u>6)return;for(i=0;d();){if(r=null,i>0){if(!("."==d()&&i<4))return;h++}if(!M.test(d()))return;for(;M.test(d());){if(o=parseInt(d(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;h++}l[u]=256*l[u]+r,2!=++i&&4!=i||u++}if(4!=i)return;break}if(":"==d()){if(h++,!d())return}else if(d())return;l[u++]=e}else{if(null!==c)return;h++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l},W=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=S(t/256);return e.join(".")}if("object"==typeof t){for(e="",i=function(t){for(var e=null,n=1,i=null,r=0,o=0;o<8;o++)0!==t[o]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(e=i,n=r),e}(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},U={},V=d({},U,{" ":1,'"':1,"<":1,">":1,"`":1}),Z=d({},V,{"#":1,"?":1,"{":1,"}":1}),Y=d({},Z,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$=function(t,e){var n=p(t,0);return n>32&&n<127&&!h(e,t)?t:encodeURIComponent(t)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(t){return h(G,t.scheme)},X=function(t){return""!=t.username||""!=t.password},J=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},Q=function(t,e){var n;return 2==t.length&&A.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},tt=function(t){var e;return t.length>1&&Q(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},et=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&Q(e[0],!0)||e.pop()},nt=function(t){return"."===t||"%2e"===t.toLowerCase()},it={},rt={},ot={},at={},st={},lt={},ut={},ct={},ht={},dt={},ft={},pt={},mt={},gt={},vt={},yt={},bt={},_t={},wt={},xt={},kt={},St=function(t,e,n,r){var o,a,s,l,u,c=n||it,d=0,p="",m=!1,g=!1,v=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(F,"")),e=e.replace(B,""),o=f(e);d<=o.length;){switch(a=o[d],c){case it:if(!a||!A.test(a)){if(n)return T;c=ot;continue}p+=a.toLowerCase(),c=rt;break;case rt:if(a&&(L.test(a)||"+"==a||"-"==a||"."==a))p+=a.toLowerCase();else{if(":"!=a){if(n)return T;p="",c=ot,d=0;continue}if(n&&(K(t)!=h(G,p)||"file"==p&&(X(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=p,n)return void(K(t)&&G[t.scheme]==t.port&&(t.port=null));p="","file"==t.scheme?c=gt:K(t)&&r&&r.scheme==t.scheme?c=at:K(t)?c=ct:"/"==o[d+1]?(c=st,d++):(t.cannotBeABaseURL=!0,t.path.push(""),c=wt)}break;case ot:if(!r||r.cannotBeABaseURL&&"#"!=a)return T;if(r.cannotBeABaseURL&&"#"==a){t.scheme=r.scheme,t.path=r.path.slice(),t.query=r.query,t.fragment="",t.cannotBeABaseURL=!0,c=kt;break}c="file"==r.scheme?gt:lt;continue;case at:if("/"!=a||"/"!=o[d+1]){c=lt;continue}c=ht,d++;break;case st:if("/"==a){c=dt;break}c=_t;continue;case lt:if(t.scheme=r.scheme,a==i)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query;else if("/"==a||"\\"==a&&K(t))c=ut;else if("?"==a)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query="",c=xt;else{if("#"!=a){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.path.pop(),c=_t;continue}t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query,t.fragment="",c=kt}break;case ut:if(!K(t)||"/"!=a&&"\\"!=a){if("/"!=a){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,c=_t;continue}c=dt}else c=ht;break;case ct:if(c=ht,"/"!=a||"/"!=p.charAt(d+1))continue;d++;break;case ht:if("/"!=a&&"\\"!=a){c=dt;continue}break;case dt:if("@"==a){m&&(p="%40"+p),m=!0,s=f(p);for(var y=0;y<s.length;y++){var b=s[y];if(":"!=b||v){var _=$(b,Y);v?t.password+=_:t.username+=_}else v=!0}p=""}else if(a==i||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)){if(m&&""==p)return"Invalid authority";d-=f(p).length+1,p="",c=ft}else p+=a;break;case ft:case pt:if(n&&"file"==t.scheme){c=yt;continue}if(":"!=a||g){if(a==i||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)){if(K(t)&&""==p)return O;if(n&&""==p&&(X(t)||null!==t.port))return;if(l=z(t,p))return l;if(p="",c=bt,n)return;continue}"["==a?g=!0:"]"==a&&(g=!1),p+=a}else{if(""==p)return O;if(l=z(t,p))return l;if(p="",c=mt,n==pt)return}break;case mt:if(!M.test(a)){if(a==i||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)||n){if(""!=p){var w=parseInt(p,10);if(w>65535)return E;t.port=K(t)&&w===G[t.scheme]?null:w,p=""}if(n)return;c=bt;continue}return E}p+=a;break;case gt:if(t.scheme="file","/"==a||"\\"==a)c=vt;else{if(!r||"file"!=r.scheme){c=_t;continue}if(a==i)t.host=r.host,t.path=r.path.slice(),t.query=r.query;else if("?"==a)t.host=r.host,t.path=r.path.slice(),t.query="",c=xt;else{if("#"!=a){tt(o.slice(d).join(""))||(t.host=r.host,t.path=r.path.slice(),et(t)),c=_t;continue}t.host=r.host,t.path=r.path.slice(),t.query=r.query,t.fragment="",c=kt}}break;case vt:if("/"==a||"\\"==a){c=yt;break}r&&"file"==r.scheme&&!tt(o.slice(d).join(""))&&(Q(r.path[0],!0)?t.path.push(r.path[0]):t.host=r.host),c=_t;continue;case yt:if(a==i||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Q(p))c=_t;else if(""==p){if(t.host="",n)return;c=bt}else{if(l=z(t,p))return l;if("localhost"==t.host&&(t.host=""),n)return;p="",c=bt}continue}p+=a;break;case bt:if(K(t)){if(c=_t,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=i&&(c=_t,"/"!=a))continue}else t.fragment="",c=kt;else t.query="",c=xt;break;case _t:if(a==i||"/"==a||"\\"==a&&K(t)||!n&&("?"==a||"#"==a)){if(".."===(u=(u=p).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(et(t),"/"==a||"\\"==a&&K(t)||t.path.push("")):nt(p)?"/"==a||"\\"==a&&K(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&Q(p)&&(t.host&&(t.host=""),p=p.charAt(0)+":"),t.path.push(p)),p="","file"==t.scheme&&(a==i||"?"==a||"#"==a))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==a?(t.query="",c=xt):"#"==a&&(t.fragment="",c=kt)}else p+=$(a,Z);break;case wt:"?"==a?(t.query="",c=xt):"#"==a?(t.fragment="",c=kt):a!=i&&(t.path[0]+=$(a,U));break;case xt:n||"#"!=a?a!=i&&("'"==a&&K(t)?t.query+="%27":t.query+="#"==a?"%23":$(a,U)):(t.fragment="",c=kt);break;case kt:a!=i&&(t.fragment+=$(a,V))}d++}},Ct=function(t){var e,n,i=c(this,Ct,"URL"),r=arguments.length>1?arguments[1]:void 0,a=String(t),s=x(i,{type:"URL"});if(void 0!==r)if(r instanceof Ct)e=k(r);else if(n=St(e={},String(r)))throw TypeError(n);if(n=St(s,a,null,e))throw TypeError(n);var l=s.searchParams=new _,u=w(l);u.updateSearchParams(s.query),u.updateURL=function(){s.query=String(l)||null},o||(i.href=Ot.call(i),i.origin=Et.call(i),i.protocol=At.call(i),i.username=Lt.call(i),i.password=Mt.call(i),i.host=Pt.call(i),i.hostname=Nt.call(i),i.port=Dt.call(i),i.pathname=jt.call(i),i.search=It.call(i),i.searchParams=Rt.call(i),i.hash=Ft.call(i))},Tt=Ct.prototype,Ot=function(){var t=k(this),e=t.scheme,n=t.username,i=t.password,r=t.host,o=t.port,a=t.path,s=t.query,l=t.fragment,u=e+":";return null!==r?(u+="//",X(t)&&(u+=n+(i?":"+i:"")+"@"),u+=W(r),null!==o&&(u+=":"+o)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},Et=function(){var t=k(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&K(t)?e+"://"+W(t.host)+(null!==n?":"+n:""):"null"},At=function(){return k(this).scheme+":"},Lt=function(){return k(this).username},Mt=function(){return k(this).password},Pt=function(){var t=k(this),e=t.host,n=t.port;return null===e?"":null===n?W(e):W(e)+":"+n},Nt=function(){var t=k(this).host;return null===t?"":W(t)},Dt=function(){var t=k(this).port;return null===t?"":String(t)},jt=function(){var t=k(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},It=function(){var t=k(this).query;return t?"?"+t:""},Rt=function(){return k(this).searchParams},Ft=function(){var t=k(this).fragment;return t?"#"+t:""},Bt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&l(Tt,{href:Bt(Ot,(function(t){var e=k(this),n=String(t),i=St(e,n);if(i)throw TypeError(i);w(e.searchParams).updateSearchParams(e.query)})),origin:Bt(Et),protocol:Bt(At,(function(t){var e=k(this);St(e,String(t)+":",it)})),username:Bt(Lt,(function(t){var e=k(this),n=f(String(t));if(!J(e)){e.username="";for(var i=0;i<n.length;i++)e.username+=$(n[i],Y)}})),password:Bt(Mt,(function(t){var e=k(this),n=f(String(t));if(!J(e)){e.password="";for(var i=0;i<n.length;i++)e.password+=$(n[i],Y)}})),host:Bt(Pt,(function(t){var e=k(this);e.cannotBeABaseURL||St(e,String(t),ft)})),hostname:Bt(Nt,(function(t){var e=k(this);e.cannotBeABaseURL||St(e,String(t),pt)})),port:Bt(Dt,(function(t){var e=k(this);J(e)||(""==(t=String(t))?e.port=null:St(e,t,mt))})),pathname:Bt(jt,(function(t){var e=k(this);e.cannotBeABaseURL||(e.path=[],St(e,t+"",bt))})),search:Bt(It,(function(t){var e=k(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",St(e,t,xt)),w(e.searchParams).updateSearchParams(e.query)})),searchParams:Bt(Rt),hash:Bt(Ft,(function(t){var e=k(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",St(e,t,kt)):e.fragment=null}))}),u(Tt,"toJSON",(function(){return Ot.call(this)}),{enumerable:!0}),u(Tt,"toString",(function(){return Ot.call(this)}),{enumerable:!0}),b){var zt=b.createObjectURL,qt=b.revokeObjectURL;zt&&u(Ct,"createObjectURL",(function(t){return zt.apply(b,arguments)})),qt&&u(Ct,"revokeObjectURL",(function(t){return qt.apply(b,arguments)}))}g(Ct,"URL"),r({global:!0,forced:!a,sham:!o},{URL:Ct})}},e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){"use strict";function t(t,n){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,n){if(t){if("string"==typeof t)return e(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){l=!0,a=t},f:function(){try{s||null==i.return||i.return()}finally{if(l)throw a}}}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}n.r(i),n.d(i,{Dropzone:function(){return _},default:function(){return C}}),n(2222),n(7327),n(2772),n(6992),n(1249),n(7042),n(561),n(8264),n(8309),n(489),n(1539),n(4916),n(9714),n(8783),n(4723),n(5306),n(3123),n(3210),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(4747),n(3948),n(285);var o=function(){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,i,o;return n=e,i=[{key:"on",value:function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}},{key:"emit",value:function(e){this._callbacks=this._callbacks||{};for(var n=this._callbacks[e],i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];if(n){var a,s=t(n,!0);try{for(s.s();!(a=s.n()).done;)a.value.apply(this,r)}catch(t){s.e(t)}finally{s.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+e,{args:r})),this}},{key:"makeEvent",value:function(t,e){var n={bubbles:!0,cancelable:!0,detail:e};if("function"==typeof window.CustomEvent)return new CustomEvent(t,n);var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),i}},{key:"off",value:function(t,e){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(var i=0;i<n.length;i++)if(n[i]===e){n.splice(i,1);break}return this}}],i&&r(n.prototype,i),o&&r(n,o),e}();function a(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var l={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(t,e,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:function(t,e){return e()},chunksUploaded:function(t,e){e()},fallback:function(){var t;this.element.className="".concat(this.element.className," dz-browser-not-supported");var e,n=a(this.element.getElementsByTagName("div"),!0);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(/(^| )dz-message($| )/.test(i.className)){t=i,i.className="dz-message";break}}}catch(t){n.e(t)}finally{n.f()}t||(t=_.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(t));var r=t.getElementsByTagName("span")[0];return r&&(null!=r.textContent?r.textContent=this.options.dictFallbackMessage:null!=r.innerText&&(r.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,n,i){var r={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;null==e&&null==n?(e=r.srcWidth,n=r.srcHeight):null==e?e=n*o:null==n&&(n=e/o);var a=(e=Math.min(e,r.srcWidth))/(n=Math.min(n,r.srcHeight));if(r.srcWidth>e||r.srcHeight>n)if("crop"===i)o>a?(r.srcHeight=t.height,r.srcWidth=r.srcHeight*a):(r.srcWidth=t.width,r.srcHeight=r.srcWidth/a);else{if("contain"!==i)throw new Error("Unknown resizeMethod '".concat(i,"'"));o>a?n=e/o:e=n*o}return r.srcX=(t.width-r.srcWidth)/2,r.srcY=(t.height-r.srcHeight)/2,r.trgWidth=e,r.trgHeight=n,r},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){t.previewElement=_.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);var n,i=a(t.previewElement.querySelectorAll("[data-dz-name]"),!0);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.textContent=t.name}}catch(t){i.e(t)}finally{i.f()}var o,s=a(t.previewElement.querySelectorAll("[data-dz-size]"),!0);try{for(s.s();!(o=s.n()).done;)(r=o.value).innerHTML=this.filesize(t.size)}catch(t){s.e(t)}finally{s.f()}this.options.addRemoveLinks&&(t._removeLink=_.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),t.previewElement.appendChild(t._removeLink));var l,u=function(n){return n.preventDefault(),n.stopPropagation(),t.status===_.UPLOADING?_.confirm(e.options.dictCancelUploadConfirmation,(function(){return e.removeFile(t)})):e.options.dictRemoveFileConfirmation?_.confirm(e.options.dictRemoveFileConfirmation,(function(){return e.removeFile(t)})):e.removeFile(t)},c=a(t.previewElement.querySelectorAll("[data-dz-remove]"),!0);try{for(c.s();!(l=c.n()).done;)l.value.addEventListener("click",u)}catch(t){c.e(t)}finally{c.f()}}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");var n,i=a(t.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.alt=t.name,r.src=e}}catch(t){i.e(t)}finally{i.f()}return setTimeout((function(){return t.previewElement.classList.add("dz-image-preview")}),1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"string"!=typeof e&&e.error&&(e=e.error);var n,i=a(t.previewElement.querySelectorAll("[data-dz-errormessage]"),!0);try{for(i.s();!(n=i.n()).done;)n.value.textContent=e}catch(t){i.e(t)}finally{i.f()}}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,n){if(t.previewElement){var i,r=a(t.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0);try{for(r.s();!(i=r.n()).done;){var o=i.value;"PROGRESS"===o.nodeName?o.value=e:o.style.width="".concat(e,"%")}}catch(t){r.e(t)}finally{r.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}};function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function p(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=b(t);if(e){var r=b(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return v(this,n)}}function v(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?y(t):e}function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(n,t);var e=g(n);function n(t,i){var r,o,a;if(d(this,n),(r=e.call(this)).element=t,r.version=n.version,r.clickableElements=[],r.listeners=[],r.files=[],"string"==typeof r.element&&(r.element=document.querySelector(r.element)),!r.element||null==r.element.nodeType)throw new Error("Invalid dropzone element.");if(r.element.dropzone)throw new Error("Dropzone already attached.");n.instances.push(y(r)),r.element.dropzone=y(r);var s=null!=(a=n.optionsForElement(r.element))?a:{};if(r.options=n.extend({},l,s,null!=i?i:{}),r.options.previewTemplate=r.options.previewTemplate.replace(/\n*/g,""),r.options.forceFallback||!n.isBrowserSupported())return v(r,r.options.fallback.call(y(r)));if(null==r.options.url&&(r.options.url=r.element.getAttribute("action")),!r.options.url)throw new Error("No URL provided.");if(r.options.acceptedFiles&&r.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(r.options.uploadMultiple&&r.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return r.options.acceptedMimeTypes&&(r.options.acceptedFiles=r.options.acceptedMimeTypes,delete r.options.acceptedMimeTypes),null!=r.options.renameFilename&&(r.options.renameFile=function(t){return r.options.renameFilename.call(y(r),t.name,t)}),"string"==typeof r.options.method&&(r.options.method=r.options.method.toUpperCase()),(o=r.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),!1!==r.options.previewsContainer&&(r.options.previewsContainer?r.previewsContainer=n.getElement(r.options.previewsContainer,"previewsContainer"):r.previewsContainer=r.element),r.options.clickable&&(!0===r.options.clickable?r.clickableElements=[r.element]:r.clickableElements=n.getElements(r.options.clickable,"clickable")),r.init(),r}return p(n,[{key:"getAcceptedFiles",value:function(){return this.files.filter((function(t){return t.accepted})).map((function(t){return t}))}},{key:"getRejectedFiles",value:function(){return this.files.filter((function(t){return!t.accepted})).map((function(t){return t}))}},{key:"getFilesWithStatus",value:function(t){return this.files.filter((function(e){return e.status===t})).map((function(t){return t}))}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(n.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(n.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(n.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter((function(t){return t.status===n.UPLOADING||t.status===n.QUEUED})).map((function(t){return t}))}},{key:"init",value:function(){var t=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(n.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length&&function e(){t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null===t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!==t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!==t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.setAttribute("tabindex","-1"),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",n.getElement(t.options.hiddenInputContainer,"hiddenInputContainer").appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",(function(){var n=t.hiddenFileInput.files;if(n.length){var i,r=c(n,!0);try{for(r.s();!(i=r.n()).done;){var o=i.value;t.addFile(o)}}catch(t){r.e(t)}finally{r.f()}}t.emit("addedfiles",n),e()}))}(),this.URL=null!==window.URL?window.URL:window.webkitURL;var e,i=c(this.events,!0);try{for(i.s();!(e=i.n()).done;){var r=e.value;this.on(r,this.options[r])}}catch(t){i.e(t)}finally{i.f()}this.on("uploadprogress",(function(){return t.updateTotalUploadProgress()})),this.on("removedfile",(function(){return t.updateTotalUploadProgress()})),this.on("canceled",(function(e){return t.emit("complete",e)})),this.on("complete",(function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout((function(){return t.emit("queuecomplete")}),0)}));var o=function(t){if(function(t){if(t.dataTransfer.types)for(var e=0;e<t.dataTransfer.types.length;e++)if("Files"===t.dataTransfer.types[e])return!0;return!1}(t))return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(e){return t.emit("dragstart",e)},dragenter:function(e){return o(e),t.emit("dragenter",e)},dragover:function(e){var n;try{n=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",o(e),t.emit("dragover",e)},dragleave:function(e){return t.emit("dragleave",e)},drop:function(e){return o(e),t.drop(e)},dragend:function(e){return t.emit("dragend",e)}}}],this.clickableElements.forEach((function(e){return t.listeners.push({element:e,events:{click:function(i){return(e!==t.element||i.target===t.element||n.elementInside(i.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})})),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,n.instances.splice(n.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var t,e=0,n=0;if(this.getActiveFiles().length){var i,r=c(this.getActiveFiles(),!0);try{for(r.s();!(i=r.n()).done;){var o=i.value;e+=o.upload.bytesSent,n+=o.upload.total}}catch(t){r.e(t)}finally{r.f()}t=100*e/n}else t=100;return this.emit("totaluploadprogress",t,n,e)}},{key:"_getParamName",value:function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(t,"]"):"")}},{key:"_renameFile",value:function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}},{key:"getFallbackForm",value:function(){var t,e;if(t=this.getExistingFallback())return t;var i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+="<p>".concat(this.options.dictFallbackText,"</p>")),i+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var r=n.createElement(i);return"FORM"!==this.element.tagName?(e=n.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>'))).appendChild(r):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:r}},{key:"getExistingFallback",value:function(){for(var t=function(t){var e,n=c(t,!0);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(/(^| )fallback($| )/.test(i.className))return i}}catch(t){n.e(t)}finally{n.f()}},e=0,n=["div","form"];e<n.length;e++){var i,r=n[e];if(i=t(this.element.getElementsByTagName(r)))return i}}},{key:"setupEventListeners",value:function(){return this.listeners.map((function(t){return function(){var e=[];for(var n in t.events){var i=t.events[n];e.push(t.element.addEventListener(n,i,!1))}return e}()}))}},{key:"removeEventListeners",value:function(){return this.listeners.map((function(t){return function(){var e=[];for(var n in t.events){var i=t.events[n];e.push(t.element.removeEventListener(n,i,!1))}return e}()}))}},{key:"disable",value:function(){var t=this;return this.clickableElements.forEach((function(t){return t.classList.remove("dz-clickable")})),this.removeEventListeners(),this.disabled=!0,this.files.map((function(e){return t.cancelUpload(e)}))}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach((function(t){return t.classList.add("dz-clickable")})),this.setupEventListeners()}},{key:"filesize",value:function(t){var e=0,n="b";if(t>0){for(var i=["tb","gb","mb","kb","b"],r=0;r<i.length;r++){var o=i[r];if(t>=Math.pow(this.options.filesizeBase,4-r)/10){e=t/Math.pow(this.options.filesizeBase,4-r),n=o;break}}e=Math.round(10*e)/10}return"<strong>".concat(e,"</strong> ").concat(this.options.dictFileSizeUnits[n])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);for(var e=[],n=0;n<t.dataTransfer.files.length;n++)e[n]=t.dataTransfer.files[n];if(e.length){var i=t.dataTransfer.items;i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)}this.emit("addedfiles",e)}}},{key:"paste",value:function(t){if(null!=(e=null!=t?t.clipboardData:void 0,n=function(t){return t.items},null!=e?n(e):void 0)){var e,n;this.emit("paste",t);var i=t.clipboardData.items;return i.length?this._addFilesFromItems(i):void 0}}},{key:"handleFiles",value:function(t){var e,n=c(t,!0);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.addFile(i)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_addFilesFromItems",value:function(t){var e=this;return function(){var n,i=[],r=c(t,!0);try{for(r.s();!(n=r.n()).done;){var o,a=n.value;null!=a.webkitGetAsEntry&&(o=a.webkitGetAsEntry())?o.isFile?i.push(e.addFile(a.getAsFile())):o.isDirectory?i.push(e._addFilesFromDirectory(o,o.name)):i.push(void 0):null==a.getAsFile||null!=a.kind&&"file"!==a.kind?i.push(void 0):i.push(e.addFile(a.getAsFile()))}}catch(t){r.e(t)}finally{r.f()}return i}()}},{key:"_addFilesFromDirectory",value:function(t,e){var n=this,i=t.createReader(),r=function(t){return e=console,n="log",i=function(e){return e.log(t)},null!=e&&"function"==typeof e[n]?i(e,n):void 0;var e,n,i};return function t(){return i.readEntries((function(i){if(i.length>0){var r,o=c(i,!0);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.isFile?a.file((function(t){if(!n.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath="".concat(e,"/").concat(t.name),n.addFile(t)})):a.isDirectory&&n._addFilesFromDirectory(a,"".concat(e,"/").concat(a.name))}}catch(t){o.e(t)}finally{o.f()}t()}return null}),r)}()}},{key:"accept",value:function(t,e){this.options.maxFilesize&&t.size>1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var e=this;t.upload={uuid:n.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=n.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,(function(n){n?(t.accepted=!1,e._errorProcessing([t],n)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function(t){var e,n=c(t,!0);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.enqueueFile(i)}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"enqueueFile",value:function(t){var e=this;if(t.status!==n.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=n.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return e.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout((function(){return e._processThumbnailQueue()}),0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(n){return t.emit("thumbnail",e,n),t._processingThumbnail=!1,t._processThumbnailQueue()}))}}},{key:"removeFile",value:function(t){if(t.status===n.UPLOADING&&this.cancelUpload(t),this.files=w(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(t){null==t&&(t=!1);var e,i=c(this.files.slice(),!0);try{for(i.s();!(e=i.n()).done;){var r=e.value;(r.status!==n.UPLOADING||t)&&this.removeFile(r)}}catch(t){i.e(t)}finally{i.f()}return null}},{key:"resizeImage",value:function(t,e,i,r,o){var a=this;return this.createThumbnail(t,e,i,r,!0,(function(e,i){if(null==i)return o(t);var r=a.options.resizeMimeType;null==r&&(r=t.type);var s=i.toDataURL(r,a.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(s=S.restore(t.dataURL,s)),o(n.dataURItoBlob(s))}))}},{key:"createThumbnail",value:function(t,e,n,i,r,o){var a=this,s=new FileReader;s.onload=function(){t.dataURL=s.result,"image/svg+xml"!==t.type?a.createThumbnailFromUrl(t,e,n,i,r,o):null!=o&&o(s.result)},s.readAsDataURL(t)}},{key:"displayExistingFile",value:function(t,e,n,i){var r=this,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];this.emit("addedfile",t),this.emit("complete",t),o?(t.dataURL=e,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,(function(e){r.emit("thumbnail",t,e),n&&n()}),i)):(this.emit("thumbnail",t,e),n&&n())}},{key:"createThumbnailFromUrl",value:function(t,e,n,i,r,o,a){var s=this,l=document.createElement("img");return a&&(l.crossOrigin=a),r="from-image"!=getComputedStyle(document.body).imageOrientation&&r,l.onload=function(){var a=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(a=function(t){return EXIF.getData(l,(function(){return t(EXIF.getTag(this,"Orientation"))}))}),a((function(r){t.width=l.width,t.height=l.height;var a=s.options.resize.call(s,t,e,n,i),u=document.createElement("canvas"),c=u.getContext("2d");switch(u.width=a.trgWidth,u.height=a.trgHeight,r>4&&(u.width=a.trgHeight,u.height=a.trgWidth),r){case 2:c.translate(u.width,0),c.scale(-1,1);break;case 3:c.translate(u.width,u.height),c.rotate(Math.PI);break;case 4:c.translate(0,u.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-u.width);break;case 7:c.rotate(.5*Math.PI),c.translate(u.height,-u.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-u.height,0)}k(c,l,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);var h=u.toDataURL("image/png");if(null!=o)return o(h,u)}))},null!=o&&(l.onerror=o),l.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,n=e;if(!(e>=t)){var i=this.getQueuedFiles();if(i.length>0){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,t-e));for(;n<t;){if(!i.length)return;this.processFile(i.shift()),n++}}}}},{key:"processFile",value:function(t){return this.processFiles([t])}},{key:"processFiles",value:function(t){var e,i=c(t,!0);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.processing=!0,r.status=n.UPLOADING,this.emit("processing",r)}}catch(t){i.e(t)}finally{i.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}},{key:"_getFilesWithXhr",value:function(t){return this.files.filter((function(e){return e.xhr===t})).map((function(t){return t}))}},{key:"cancelUpload",value:function(t){if(t.status===n.UPLOADING){var e,i=this._getFilesWithXhr(t.xhr),r=c(i,!0);try{for(r.s();!(e=r.n()).done;)e.value.status=n.CANCELED}catch(t){r.e(t)}finally{r.f()}void 0!==t.xhr&&t.xhr.abort();var o,a=c(i,!0);try{for(a.s();!(o=a.n()).done;){var s=o.value;this.emit("canceled",s)}}catch(t){a.e(t)}finally{a.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else t.status!==n.ADDED&&t.status!==n.QUEUED||(t.status=n.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(t){if("function"==typeof t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return t.apply(this,n)}return t}},{key:"uploadFile",value:function(t){return this.uploadFiles([t])}},{key:"uploadFiles",value:function(t){var e=this;this._transformFiles(t,(function(i){if(e.options.chunking){var r=i[0];t[0].upload.chunked=e.options.chunking&&(e.options.forceChunking||r.size>e.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(r.size/e.options.chunkSize)}if(t[0].upload.chunked){var o=t[0],a=i[0];o.upload.chunks=[];var s=function(){for(var i=0;void 0!==o.upload.chunks[i];)i++;if(!(i>=o.upload.totalChunkCount)){var r=i*e.options.chunkSize,s=Math.min(r+e.options.chunkSize,a.size),l={name:e._getParamName(0),data:a.webkitSlice?a.webkitSlice(r,s):a.slice(r,s),filename:o.upload.filename,chunkIndex:i};o.upload.chunks[i]={file:o,index:i,dataBlock:l,status:n.UPLOADING,progress:0,retries:0},e._uploadData(t,[l])}};if(o.upload.finishedChunkUpload=function(i,r){var a=!0;i.status=n.SUCCESS,i.dataBlock=null,i.xhr=null;for(var l=0;l<o.upload.totalChunkCount;l++){if(void 0===o.upload.chunks[l])return s();o.upload.chunks[l].status!==n.SUCCESS&&(a=!1)}a&&e.options.chunksUploaded(o,(function(){e._finished(t,r,null)}))},e.options.parallelChunkUploads)for(var l=0;l<o.upload.totalChunkCount;l++)s();else s()}else{for(var u=[],c=0;c<t.length;c++)u[c]={name:e._getParamName(c),data:i[c],filename:t[c].upload.filename};e._uploadData(t,u)}}))}},{key:"_getChunk",value:function(t,e){for(var n=0;n<t.upload.totalChunkCount;n++)if(void 0!==t.upload.chunks[n]&&t.upload.chunks[n].xhr===e)return t.upload.chunks[n]}},{key:"_uploadData",value:function(t,e){var i,r=this,o=new XMLHttpRequest,a=c(t,!0);try{for(a.s();!(i=a.n()).done;)i.value.xhr=o}catch(t){a.e(t)}finally{a.f()}t[0].upload.chunked&&(t[0].upload.chunks[e[0].chunkIndex].xhr=o);var s=this.resolveOption(this.options.method,t),l=this.resolveOption(this.options.url,t);o.open(s,l,!0),this.resolveOption(this.options.timeout,t)&&(o.timeout=this.resolveOption(this.options.timeout,t)),o.withCredentials=!!this.options.withCredentials,o.onload=function(e){r._finishedUploading(t,o,e)},o.ontimeout=function(){r._handleUploadError(t,o,"Request timedout after ".concat(r.options.timeout/1e3," seconds"))},o.onerror=function(){r._handleUploadError(t,o)},(null!=o.upload?o.upload:o).onprogress=function(e){return r._updateFilesUploadProgress(t,o,e)};var u={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var h in this.options.headers&&n.extend(u,this.options.headers),u){var d=u[h];d&&o.setRequestHeader(h,d)}var f=new FormData;if(this.options.params){var p=this.options.params;for(var m in"function"==typeof p&&(p=p.call(this,t,o,t[0].upload.chunked?this._getChunk(t[0],o):null)),p){var g=p[m];if(Array.isArray(g))for(var v=0;v<g.length;v++)f.append(m,g[v]);else f.append(m,g)}}var y,b=c(t,!0);try{for(b.s();!(y=b.n()).done;){var _=y.value;this.emit("sending",_,o,f)}}catch(t){b.e(t)}finally{b.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",t,o,f),this._addFormElementData(f);for(var w=0;w<e.length;w++){var x=e[w];f.append(x.name,x.data,x.filename)}this.submitRequest(o,f,t)}},{key:"_transformFiles",value:function(t,e){for(var n=this,i=[],r=0,o=function(o){n.options.transformFile.call(n,t[o],(function(n){i[o]=n,++r===t.length&&e(i)}))},a=0;a<t.length;a++)o(a)}},{key:"_addFormElementData",value:function(t){if("FORM"===this.element.tagName){var e,n=c(this.element.querySelectorAll("input, textarea, select, button"),!0);try{for(n.s();!(e=n.n()).done;){var i=e.value,r=i.getAttribute("name"),o=i.getAttribute("type");if(o&&(o=o.toLowerCase()),null!=r)if("SELECT"===i.tagName&&i.hasAttribute("multiple")){var a,s=c(i.options,!0);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.selected&&t.append(r,l.value)}}catch(t){s.e(t)}finally{s.f()}}else(!o||"checkbox"!==o&&"radio"!==o||i.checked)&&t.append(r,i.value)}}catch(t){n.e(t)}finally{n.f()}}}},{key:"_updateFilesUploadProgress",value:function(t,e,n){if(t[0].upload.chunked){var i=t[0],r=this._getChunk(i,e);n?(r.progress=100*n.loaded/n.total,r.total=n.total,r.bytesSent=n.loaded):(r.progress=100,r.bytesSent=r.total),i.upload.progress=0,i.upload.total=0,i.upload.bytesSent=0;for(var o=0;o<i.upload.totalChunkCount;o++)i.upload.chunks[o]&&void 0!==i.upload.chunks[o].progress&&(i.upload.progress+=i.upload.chunks[o].progress,i.upload.total+=i.upload.chunks[o].total,i.upload.bytesSent+=i.upload.chunks[o].bytesSent);i.upload.progress=i.upload.progress/i.upload.totalChunkCount,this.emit("uploadprogress",i,i.upload.progress,i.upload.bytesSent)}else{var a,s=c(t,!0);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.upload.total&&l.upload.bytesSent&&l.upload.bytesSent==l.upload.total||(n?(l.upload.progress=100*n.loaded/n.total,l.upload.total=n.total,l.upload.bytesSent=n.loaded):(l.upload.progress=100,l.upload.bytesSent=l.upload.total),this.emit("uploadprogress",l,l.upload.progress,l.upload.bytesSent))}}catch(t){s.e(t)}finally{s.f()}}}},{key:"_finishedUploading",value:function(t,e,i){var r;if(t[0].status!==n.CANCELED&&4===e.readyState){if("arraybuffer"!==e.responseType&&"blob"!==e.responseType&&(r=e.responseText,e.getResponseHeader("content-type")&&~e.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(t){i=t,r="Invalid JSON response from server."}this._updateFilesUploadProgress(t,e),200<=e.status&&e.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],e),r):this._finished(t,r,i):this._handleUploadError(t,e,r)}}},{key:"_handleUploadError",value:function(t,e,i){if(t[0].status!==n.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(t[0],e);if(r.retries++<this.options.retryChunksLimit)return void this._uploadData(t,[r.dataBlock])}this._errorProcessing(t,i||this.options.dictResponseError.replace("{{statusCode}}",e.status),e)}}},{key:"submitRequest",value:function(t,e,n){1==t.readyState&&t.send(e)}},{key:"_finished",value:function(t,e,i){var r,o=c(t,!0);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.status=n.SUCCESS,this.emit("success",a,e,i),this.emit("complete",a)}}catch(t){o.e(t)}finally{o.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(t,e,i){var r,o=c(t,!0);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.status=n.ERROR,this.emit("error",a,e,i),this.emit("complete",a)}}catch(t){o.e(t)}finally{o.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=o,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];for(var r=0,o=n;r<o.length;r++){var a=o[r];for(var s in a){var l=a[s];t[s]=l}}return t}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}}]),n}(o);_.initClass(),_.version="5.9.3",_.options={},_.optionsForElement=function(t){return t.getAttribute("id")?_.options[x(t.getAttribute("id"))]:void 0},_.instances=[],_.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},_.autoDiscover=!0,_.discover=function(){var t;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];var e=function(e){return function(){var n,i=[],r=c(e,!0);try{for(r.s();!(n=r.n()).done;){var o=n.value;/(^| )dropzone($| )/.test(o.className)?i.push(t.push(o)):i.push(void 0)}}catch(t){r.e(t)}finally{r.f()}return i}()};e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return function(){var e,n=[],i=c(t,!0);try{for(i.s();!(e=i.n()).done;){var r=e.value;!1!==_.optionsForElement(r)?n.push(new _(r)):n.push(void 0)}}catch(t){i.e(t)}finally{i.f()}return n}()},_.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],_.isBrowserSupported=function(){var t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){void 0!==_.blacklistedBrowsers&&(_.blockedBrowsers=_.blacklistedBrowsers);var e,n=c(_.blockedBrowsers,!0);try{for(n.s();!(e=n.n()).done;)e.value.test(navigator.userAgent)&&(t=!1)}catch(t){n.e(t)}finally{n.f()}}else t=!1;else t=!1;return t},_.dataURItoBlob=function(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(e.length),r=new Uint8Array(i),o=0,a=e.length,s=0<=a;s?o<=a:o>=a;s?o++:o--)r[o]=e.charCodeAt(o);return new Blob([i],{type:n})};var w=function(t,e){return t.filter((function(t){return t!==e})).map((function(t){return t}))},x=function(t){return t.replace(/[\-_](\w)/g,(function(t){return t.charAt(1).toUpperCase()}))};_.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},_.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},_.getElement=function(t,e){var n;if("string"==typeof t?n=document.querySelector(t):null!=t.nodeType&&(n=t),null==n)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},_.getElements=function(t,e){var n,i;if(t instanceof Array){i=[];try{var r,o=c(t,!0);try{for(o.s();!(r=o.n()).done;)n=r.value,i.push(this.getElement(n,e))}catch(t){o.e(t)}finally{o.f()}}catch(t){i=null}}else if("string"==typeof t){i=[];var a,s=c(document.querySelectorAll(t),!0);try{for(s.s();!(a=s.n()).done;)n=a.value,i.push(n)}catch(t){s.e(t)}finally{s.f()}}else null!=t.nodeType&&(i=[t]);if(null==i||!i.length)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return i},_.confirm=function(t,e,n){return window.confirm(t)?e():null!=n?n():void 0},_.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");var n,i=t.type,r=i.replace(/\/.*$/,""),o=c(e,!0);try{for(o.s();!(n=o.n()).done;){var a=n.value;if("."===(a=a.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(a.toLowerCase(),t.name.length-a.length))return!0}else if(/\/\*$/.test(a)){if(r===a.replace(/\/.*$/,""))return!0}else if(i===a)return!0}}catch(t){o.e(t)}finally{o.f()}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each((function(){return new _(this,t)}))}),_.ADDED="added",_.QUEUED="queued",_.ACCEPTED=_.QUEUED,_.UPLOADING="uploading",_.PROCESSING=_.UPLOADING,_.CANCELED="canceled",_.ERROR="error",_.SUCCESS="success";var k=function(t,e,n,i,r,o,a,s,l,u){var c=function(t){t.naturalWidth;var e=t.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=e;var i=n.getContext("2d");i.drawImage(t,0,0);for(var r=i.getImageData(1,0,1,e).data,o=0,a=e,s=e;s>o;)0===r[4*(s-1)+3]?a=s:o=s,s=a+o>>1;var l=s/e;return 0===l?1:l}(e);return t.drawImage(e,n,i,r,o,a,s,l,u/c)},S=function(){function t(){d(this,t)}return p(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",n=void 0,i=void 0,r="",o=void 0,a=void 0,s=void 0,l="",u=0;o=(n=t[u++])>>2,a=(3&n)<<4|(i=t[u++])>>4,s=(15&i)<<2|(r=t[u++])>>6,l=63&r,isNaN(i)?s=l=64:isNaN(r)&&(l=64),e=e+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(l),n=i=r="",o=a=s=l="",u<t.length;);return e}},{key:"restore",value:function(t,e){if(!t.match("data:image/jpeg;base64,"))return e;var n=this.decode64(t.replace("data:image/jpeg;base64,","")),i=this.slice2Segments(n),r=this.exifManipulation(e,i);return"data:image/jpeg;base64,".concat(this.encode64(r))}},{key:"exifManipulation",value:function(t,e){var n=this.getExifArray(e),i=this.insertExif(t,n);return new Uint8Array(i)}},{key:"getExifArray",value:function(t){for(var e=void 0,n=0;n<t.length;){if(255===(e=t[n])[0]&225===e[1])return e;n++}return[]}},{key:"insertExif",value:function(t,e){var n=t.replace("data:image/jpeg;base64,",""),i=this.decode64(n),r=i.indexOf(255,3),o=i.slice(0,r),a=i.slice(r),s=o;return s=(s=s.concat(e)).concat(a)}},{key:"slice2Segments",value:function(t){for(var e=0,n=[];!(255===t[e]&218===t[e+1]);){if(255===t[e]&216===t[e+1])e+=2;else{var i=e+(256*t[e+2]+t[e+3])+2,r=t.slice(e,i);n.push(r),e=i}if(e>t.length)break}return n}},{key:"decode64",value:function(t){var e=void 0,n=void 0,i="",r=void 0,o=void 0,a="",s=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");e=this.KEY_STR.indexOf(t.charAt(s++))<<2|(r=this.KEY_STR.indexOf(t.charAt(s++)))>>4,n=(15&r)<<4|(o=this.KEY_STR.indexOf(t.charAt(s++)))>>2,i=(3&o)<<6|(a=this.KEY_STR.indexOf(t.charAt(s++))),l.push(e),64!==o&&l.push(n),64!==a&&l.push(i),e=n=i="",r=o=a="",s<t.length;);return l}}]),t}();S.initClass(),_._autoDiscoverFunction=function(){if(_.autoDiscover)return _.discover()},function(t,e){var n=!1,i=!0,r=t.document,o=r.documentElement,a=r.addEventListener?"addEventListener":"attachEvent",s=r.addEventListener?"removeEventListener":"detachEvent",l=r.addEventListener?"":"on",u=function i(o){if("readystatechange"!==o.type||"complete"===r.readyState)return("load"===o.type?t:r)[s](l+o.type,i,!1),!n&&(n=!0)?e.call(t,o.type||o):void 0};if("complete"!==r.readyState){if(r.createEventObject&&o.doScroll){try{i=!t.frameElement}catch(t){}i&&function t(){try{o.doScroll("left")}catch(e){return void setTimeout(t,50)}return u("poll")}()}r[a](l+"DOMContentLoaded",u,!1),r[a](l+"readystatechange",u,!1),t[a](l+"load",u,!1)}}(window,_._autoDiscoverFunction),window.Dropzone=_;var C=_}(),i}()},t.exports=e()},7196:(t,e,n)=>{"use strict";n.d(e,{A:()=>I});var i=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],r={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return"undefined"!=typeof console&&void 0},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var n=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};const a=o;var s=function(t,e){return void 0===e&&(e=2),("000"+t).slice(-1*e)},l=function(t){return!0===t?1:0};function u(t,e){var n;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){return t.apply(i,r)}),e)}}var c=function(t){return t instanceof Array?t:[t]};function h(t,e,n){if(!0===n)return t.classList.add(e);t.classList.remove(e)}function d(t,e,n){var i=window.document.createElement(t);return e=e||"",n=n||"",i.className=e,void 0!==n&&(i.textContent=n),i}function f(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function p(t,e){return e(t)?t:t.parentNode?p(t.parentNode,e):void 0}function m(t,e){var n=d("div","numInputWrapper"),i=d("input","numInput "+t),r=d("span","arrowUp"),o=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==e)for(var a in e)i.setAttribute(a,e[a]);return n.appendChild(i),n.appendChild(r),n.appendChild(o),n}function g(t){try{return"function"==typeof t.composedPath?t.composedPath()[0]:t.target}catch(e){return t.target}}var v=function(){},y=function(t,e,n){return n.months[e?"shorthand":"longhand"][t]},b={D:v,F:function(t,e,n){t.setMonth(n.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,n){t.setHours(t.getHours()%12+12*l(new RegExp(n.amPM[1],"i").test(e)))},M:function(t,e,n){t.setMonth(n.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(1e3*parseFloat(e))},W:function(t,e,n){var i=parseInt(e),r=new Date(t.getFullYear(),0,2+7*(i-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+n.firstDayOfWeek),r},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:v,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:v,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}},_={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},w={Z:function(t){return t.toISOString()},D:function(t,e,n){return e.weekdays.shorthand[w.w(t,e,n)]},F:function(t,e,n){return y(w.n(t,e,n)-1,!1,e)},G:function(t,e,n){return s(w.h(t,e,n))},H:function(t){return s(t.getHours())},J:function(t,e){return void 0!==e.ordinal?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[l(t.getHours()>11)]},M:function(t,e){return y(t.getMonth(),!0,e)},S:function(t){return s(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,n){return n.getWeek(t)},Y:function(t){return s(t.getFullYear(),4)},d:function(t){return s(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return s(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return s(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},x=function(t){var e=t.config,n=void 0===e?r:e,i=t.l10n,a=void 0===i?o:i,s=t.isMobile,l=void 0!==s&&s;return function(t,e,i){var r=i||a;return void 0===n.formatDate||l?e.split("").map((function(e,i,o){return w[e]&&"\\"!==o[i-1]?w[e](t,r,n):"\\"!==e?e:""})).join(""):n.formatDate(t,e,r)}},k=function(t){var e=t.config,n=void 0===e?r:e,i=t.l10n,a=void 0===i?o:i;return function(t,e,i,o){if(0===t||t){var s,l=o||a,u=t;if(t instanceof Date)s=new Date(t.getTime());else if("string"!=typeof t&&void 0!==t.toFixed)s=new Date(t);else if("string"==typeof t){var c=e||(n||r).dateFormat,h=String(t).trim();if("today"===h)s=new Date,i=!0;else if(n&&n.parseDate)s=n.parseDate(t,c);else if(/Z$/.test(h)||/GMT$/.test(h))s=new Date(t);else{for(var d=void 0,f=[],p=0,m=0,g="";p<c.length;p++){var v=c[p],y="\\"===v,w="\\"===c[p-1]||y;if(_[v]&&!w){g+=_[v];var x=new RegExp(g).exec(t);x&&(d=!0)&&f["Y"!==v?"push":"unshift"]({fn:b[v],val:x[++m]})}else y||(g+=".")}s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),f.forEach((function(t){var e=t.fn,n=t.val;return s=e(s,n,l)||s})),s=d?s:void 0}}if(s instanceof Date&&!isNaN(s.getTime()))return!0===i&&s.setHours(0,0,0,0),s;n.errorHandler(new Error("Invalid date provided: "+u))}}};function S(t,e,n){return void 0===n&&(n=!0),!1!==n?new Date(t.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):t.getTime()-e.getTime()}var C=function(t,e,n){return t>Math.min(e,n)&&t<Math.max(e,n)},T=function(t,e,n){return 3600*t+60*e+n},O=function(t){var e=Math.floor(t/3600),n=(t-3600*e)/60;return[e,n,t-3600*e-60*n]},E={DAY:864e5};function A(t){var e=t.defaultHour,n=t.defaultMinute,i=t.defaultSeconds;if(void 0!==t.minDate){var r=t.minDate.getHours(),o=t.minDate.getMinutes(),a=t.minDate.getSeconds();e<r&&(e=r),e===r&&n<o&&(n=o),e===r&&n===o&&i<a&&(i=t.minDate.getSeconds())}if(void 0!==t.maxDate){var s=t.maxDate.getHours(),l=t.maxDate.getMinutes();(e=Math.min(e,s))===s&&(n=Math.min(l,n)),e===s&&n===l&&(i=t.maxDate.getSeconds())}return{hours:e,minutes:n,seconds:i}}n(5990);var L=function(){return L=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},L.apply(this,arguments)},M=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i},P=300;function N(t,e){var n={config:L(L({},r),j.defaultConfig),l10n:a};function o(){var t;return(null===(t=n.calendarContainer)||void 0===t?void 0:t.getRootNode()).activeElement||document.activeElement}function v(t){return t.bind(n)}function b(){var t=n.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==n.calendarContainer&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),void 0!==n.daysContainer){var e=(n.days.offsetWidth+1)*t.showMonths;n.daysContainer.style.width=e+"px",n.calendarContainer.style.width=e+(void 0!==n.weekWrapper?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}}))}function w(t){if(0===n.selectedDates.length){var e=void 0===n.config.minDate||S(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),i=A(n.config);e.setHours(i.hours,i.minutes,i.seconds,e.getMilliseconds()),n.selectedDates=[e],n.latestSelectedDateObj=e}void 0!==t&&"blur"!==t.type&&function(t){t.preventDefault();var e="keydown"===t.type,i=g(t),r=i;void 0!==n.amPM&&i===n.amPM&&(n.amPM.textContent=n.l10n.amPM[l(n.amPM.textContent===n.l10n.amPM[0])]);var o=parseFloat(r.getAttribute("min")),a=parseFloat(r.getAttribute("max")),u=parseFloat(r.getAttribute("step")),c=parseInt(r.value,10),h=t.delta||(e?38===t.which?1:-1:0),d=c+u*h;if(void 0!==r.value&&2===r.value.length){var f=r===n.hourElement,p=r===n.minuteElement;d<o?(d=a+d+l(!f)+(l(f)&&l(!n.amPM)),p&&H(void 0,-1,n.hourElement)):d>a&&(d=r===n.hourElement?d-a-l(!n.amPM):o,p&&H(void 0,1,n.hourElement)),n.amPM&&f&&(1===u?d+c===23:Math.abs(d-c)>u)&&(n.amPM.textContent=n.l10n.amPM[l(n.amPM.textContent===n.l10n.amPM[0])]),r.value=s(d)}}(t);var r=n._input.value;N(),Tt(),n._input.value!==r&&n._debouncedChange()}function N(){if(void 0!==n.hourElement&&void 0!==n.minuteElement){var t,e,i=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,r=(parseInt(n.minuteElement.value,10)||0)%60,o=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;void 0!==n.amPM&&(t=i,e=n.amPM.textContent,i=t%12+12*l(e===n.l10n.amPM[1]));var a=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===S(n.latestSelectedDateObj,n.config.minDate,!0),s=void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===S(n.latestSelectedDateObj,n.config.maxDate,!0);if(void 0!==n.config.maxTime&&void 0!==n.config.minTime&&n.config.minTime>n.config.maxTime){var u=T(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),c=T(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),h=T(i,r,o);if(h>c&&h<u){var d=O(u);i=d[0],r=d[1],o=d[2]}}else{if(s){var f=void 0!==n.config.maxTime?n.config.maxTime:n.config.maxDate;(i=Math.min(i,f.getHours()))===f.getHours()&&(r=Math.min(r,f.getMinutes())),r===f.getMinutes()&&(o=Math.min(o,f.getSeconds()))}if(a){var p=void 0!==n.config.minTime?n.config.minTime:n.config.minDate;(i=Math.max(i,p.getHours()))===p.getHours()&&r<p.getMinutes()&&(r=p.getMinutes()),r===p.getMinutes()&&(o=Math.max(o,p.getSeconds()))}}I(i,r,o)}}function D(t){var e=t||n.latestSelectedDateObj;e&&e instanceof Date&&I(e.getHours(),e.getMinutes(),e.getSeconds())}function I(t,e,i){void 0!==n.latestSelectedDateObj&&n.latestSelectedDateObj.setHours(t%24,e,i||0,0),n.hourElement&&n.minuteElement&&!n.isMobile&&(n.hourElement.value=s(n.config.time_24hr?t:(12+t)%12+12*l(t%12==0)),n.minuteElement.value=s(e),void 0!==n.amPM&&(n.amPM.textContent=n.l10n.amPM[l(t>=12)]),void 0!==n.secondElement&&(n.secondElement.value=s(i)))}function R(t){var e=g(t),n=parseInt(e.value)+(t.delta||0);(n/1e3>1||"Enter"===t.key&&!/[^\d]/.test(n.toString()))&&it(n)}function F(t,e,i,r){return e instanceof Array?e.forEach((function(e){return F(t,e,i,r)})):t instanceof Array?t.forEach((function(t){return F(t,e,i,r)})):(t.addEventListener(e,i,r),void n._handlers.push({remove:function(){return t.removeEventListener(e,i,r)}}))}function B(){wt("onChange")}function z(t,e){var i=void 0!==t?n.parseDate(t):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),r=n.currentYear,o=n.currentMonth;try{void 0!==i&&(n.currentYear=i.getFullYear(),n.currentMonth=i.getMonth())}catch(t){t.message="Invalid date supplied: "+i,n.config.errorHandler(t)}e&&n.currentYear!==r&&(wt("onYearChange"),G()),!e||n.currentYear===r&&n.currentMonth===o||wt("onMonthChange"),n.redraw()}function q(t){var e=g(t);~e.className.indexOf("arrow")&&H(t,e.classList.contains("arrowUp")?1:-1)}function H(t,e,n){var i=t&&g(t),r=n||i&&i.parentNode&&i.parentNode.firstChild,o=xt("increment");o.delta=e,r&&r.dispatchEvent(o)}function W(t,e,i,r){var o=rt(e,!0),a=d("span",t,e.getDate().toString());return a.dateObj=e,a.$i=r,a.setAttribute("aria-label",n.formatDate(e,n.config.ariaDateFormat)),-1===t.indexOf("hidden")&&0===S(e,n.now)&&(n.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,kt(e)&&(a.classList.add("selected"),n.selectedDateElem=a,"range"===n.config.mode&&(h(a,"startRange",n.selectedDates[0]&&0===S(e,n.selectedDates[0],!0)),h(a,"endRange",n.selectedDates[1]&&0===S(e,n.selectedDates[1],!0)),"nextMonthDay"===t&&a.classList.add("inRange")))):a.classList.add("flatpickr-disabled"),"range"===n.config.mode&&function(t){return!("range"!==n.config.mode||n.selectedDates.length<2)&&(S(t,n.selectedDates[0])>=0&&S(t,n.selectedDates[1])<=0)}(e)&&!kt(e)&&a.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==t&&r%7==6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(e)+"</span>"),wt("onDayCreate",a),a}function U(t){t.focus(),"range"===n.config.mode&&lt(t)}function V(t){for(var e=t>0?0:n.config.showMonths-1,i=t>0?n.config.showMonths:-1,r=e;r!=i;r+=t)for(var o=n.daysContainer.children[r],a=t>0?0:o.children.length-1,s=t>0?o.children.length:-1,l=a;l!=s;l+=t){var u=o.children[l];if(-1===u.className.indexOf("hidden")&&rt(u.dateObj))return u}}function Z(t,e){var i=o(),r=ot(i||document.body),a=void 0!==t?t:r?i:void 0!==n.selectedDateElem&&ot(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&ot(n.todayDateElem)?n.todayDateElem:V(e>0?1:-1);void 0===a?n._input.focus():r?function(t,e){for(var i=-1===t.className.indexOf("Month")?t.dateObj.getMonth():n.currentMonth,r=e>0?n.config.showMonths:-1,o=e>0?1:-1,a=i-n.currentMonth;a!=r;a+=o)for(var s=n.daysContainer.children[a],l=i-n.currentMonth===a?t.$i+e:e<0?s.children.length-1:0,u=s.children.length,c=l;c>=0&&c<u&&c!=(e>0?u:-1);c+=o){var h=s.children[c];if(-1===h.className.indexOf("hidden")&&rt(h.dateObj)&&Math.abs(t.$i-c)>=Math.abs(e))return U(h)}n.changeMonth(o),Z(V(o),0)}(a,e):U(a)}function Y(t,e){for(var i=(new Date(t,e,1).getDay()-n.l10n.firstDayOfWeek+7)%7,r=n.utils.getDaysInMonth((e-1+12)%12,t),o=n.utils.getDaysInMonth(e,t),a=window.document.createDocumentFragment(),s=n.config.showMonths>1,l=s?"prevMonthDay hidden":"prevMonthDay",u=s?"nextMonthDay hidden":"nextMonthDay",c=r+1-i,h=0;c<=r;c++,h++)a.appendChild(W("flatpickr-day "+l,new Date(t,e-1,c),0,h));for(c=1;c<=o;c++,h++)a.appendChild(W("flatpickr-day",new Date(t,e,c),0,h));for(var f=o+1;f<=42-i&&(1===n.config.showMonths||h%7!=0);f++,h++)a.appendChild(W("flatpickr-day "+u,new Date(t,e+1,f%o),0,h));var p=d("div","dayContainer");return p.appendChild(a),p}function $(){if(void 0!==n.daysContainer){f(n.daysContainer),n.weekNumbers&&f(n.weekNumbers);for(var t=document.createDocumentFragment(),e=0;e<n.config.showMonths;e++){var i=new Date(n.currentYear,n.currentMonth,1);i.setMonth(n.currentMonth+e),t.appendChild(Y(i.getFullYear(),i.getMonth()))}n.daysContainer.appendChild(t),n.days=n.daysContainer.firstChild,"range"===n.config.mode&&1===n.selectedDates.length&&lt()}}function G(){if(!(n.config.showMonths>1||"dropdown"!==n.config.monthSelectorType)){var t=function(t){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&t<n.config.minDate.getMonth())&&!(void 0!==n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()&&t>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var e=0;e<12;e++)if(t(e)){var i=d("option","flatpickr-monthDropdown-month");i.value=new Date(n.currentYear,e).getMonth().toString(),i.textContent=y(e,n.config.shorthandCurrentMonth,n.l10n),i.tabIndex=-1,n.currentMonth===e&&(i.selected=!0),n.monthsDropdownContainer.appendChild(i)}}}function K(){var t,e=d("div","flatpickr-month"),i=window.document.createDocumentFragment();n.config.showMonths>1||"static"===n.config.monthSelectorType?t=d("span","cur-month"):(n.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),F(n.monthsDropdownContainer,"change",(function(t){var e=g(t),i=parseInt(e.value,10);n.changeMonth(i-n.currentMonth),wt("onMonthChange")})),G(),t=n.monthsDropdownContainer);var r=m("cur-year",{tabindex:"-1"}),o=r.getElementsByTagName("input")[0];o.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&o.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(o.setAttribute("max",n.config.maxDate.getFullYear().toString()),o.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var a=d("div","flatpickr-current-month");return a.appendChild(t),a.appendChild(r),i.appendChild(a),e.appendChild(i),{container:e,yearElement:o,monthElement:t}}function X(){f(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var t=n.config.showMonths;t--;){var e=K();n.yearElements.push(e.yearElement),n.monthElements.push(e.monthElement),n.monthNav.appendChild(e.container)}n.monthNav.appendChild(n.nextMonthNav)}function J(){n.weekdayContainer?f(n.weekdayContainer):n.weekdayContainer=d("div","flatpickr-weekdays");for(var t=n.config.showMonths;t--;){var e=d("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(e)}return Q(),n.weekdayContainer}function Q(){if(n.weekdayContainer){var t=n.l10n.firstDayOfWeek,e=M(n.l10n.weekdays.shorthand);t>0&&t<e.length&&(e=M(e.splice(t,e.length),e.splice(0,t)));for(var i=n.config.showMonths;i--;)n.weekdayContainer.children[i].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+e.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}}function tt(t,e){void 0===e&&(e=!0);var i=e?t:t-n.currentMonth;i<0&&!0===n._hidePrevMonthArrow||i>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=i,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,wt("onYearChange"),G()),$(),wt("onMonthChange"),St())}function et(t){return n.calendarContainer.contains(t)}function nt(t){if(n.isOpen&&!n.config.inline){var e=g(t),i=et(e),r=!(e===n.input||e===n.altInput||n.element.contains(e)||t.path&&t.path.indexOf&&(~t.path.indexOf(n.input)||~t.path.indexOf(n.altInput)))&&!i&&!et(t.relatedTarget),o=!n.config.ignoredFocusElements.some((function(t){return t.contains(e)}));r&&o&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&w(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&n.clear(!1))}}function it(t){if(!(!t||n.config.minDate&&t<n.config.minDate.getFullYear()||n.config.maxDate&&t>n.config.maxDate.getFullYear())){var e=t,i=n.currentYear!==e;n.currentYear=e||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),i&&(n.redraw(),wt("onYearChange"),G())}}function rt(t,e){var i;void 0===e&&(e=!0);var r=n.parseDate(t,void 0,e);if(n.config.minDate&&r&&S(r,n.config.minDate,void 0!==e?e:!n.minDateHasTime)<0||n.config.maxDate&&r&&S(r,n.config.maxDate,void 0!==e?e:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===r)return!1;for(var o=!!n.config.enable,a=null!==(i=n.config.enable)&&void 0!==i?i:n.config.disable,s=0,l=void 0;s<a.length;s++){if("function"==typeof(l=a[s])&&l(r))return o;if(l instanceof Date&&void 0!==r&&l.getTime()===r.getTime())return o;if("string"==typeof l){var u=n.parseDate(l,void 0,!0);return u&&u.getTime()===r.getTime()?o:!o}if("object"==typeof l&&void 0!==r&&l.from&&l.to&&r.getTime()>=l.from.getTime()&&r.getTime()<=l.to.getTime())return o}return!o}function ot(t){return void 0!==n.daysContainer&&(-1===t.className.indexOf("hidden")&&-1===t.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(t))}function at(t){var e=t.target===n._input,i=n._input.value.trimEnd()!==Ct();!e||!i||t.relatedTarget&&et(t.relatedTarget)||n.setDate(n._input.value,!0,t.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function st(e){var i=g(e),r=n.config.wrap?t.contains(i):i===n._input,a=n.config.allowInput,s=n.isOpen&&(!a||!r),l=n.config.inline&&r&&!a;if(13===e.keyCode&&r){if(a)return n.setDate(n._input.value,!0,i===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),i.blur();n.open()}else if(et(i)||s||l){var u=!!n.timeContainer&&n.timeContainer.contains(i);switch(e.keyCode){case 13:u?(e.preventDefault(),w(),mt()):gt(e);break;case 27:e.preventDefault(),mt();break;case 8:case 46:r&&!n.config.allowInput&&(e.preventDefault(),n.clear());break;case 37:case 39:if(u||r)n.hourElement&&n.hourElement.focus();else{e.preventDefault();var c=o();if(void 0!==n.daysContainer&&(!1===a||c&&ot(c))){var h=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),tt(h),Z(V(1),0)):Z(void 0,h)}}break;case 38:case 40:e.preventDefault();var d=40===e.keyCode?1:-1;n.daysContainer&&void 0!==i.$i||i===n.input||i===n.altInput?e.ctrlKey?(e.stopPropagation(),it(n.currentYear-d),Z(V(1),0)):u||Z(void 0,7*d):i===n.currentYearElement?it(n.currentYear-d):n.config.enableTime&&(!u&&n.hourElement&&n.hourElement.focus(),w(e),n._debouncedChange());break;case 9:if(u){var f=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((function(t){return t})),p=f.indexOf(i);if(-1!==p){var m=f[p+(e.shiftKey?-1:1)];e.preventDefault(),(m||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(i)&&e.shiftKey&&(e.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&i===n.amPM)switch(e.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],N(),Tt();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],N(),Tt()}(r||et(i))&&wt("onKeyDown",e)}function lt(t,e){if(void 0===e&&(e="flatpickr-day"),1===n.selectedDates.length&&(!t||t.classList.contains(e)&&!t.classList.contains("flatpickr-disabled"))){for(var i=t?t.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),r=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),o=Math.min(i,n.selectedDates[0].getTime()),a=Math.max(i,n.selectedDates[0].getTime()),s=!1,l=0,u=0,c=o;c<a;c+=E.DAY)rt(new Date(c),!0)||(s=s||c>o&&c<a,c<r&&(!l||c>l)?l=c:c>r&&(!u||c<u)&&(u=c));Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+e)).forEach((function(e){var o=e.dateObj.getTime(),a=l>0&&o<l||u>0&&o>u;if(a)return e.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(t){e.classList.remove(t)}));s&&!a||(["startRange","inRange","endRange","notAllowed"].forEach((function(t){e.classList.remove(t)})),void 0!==t&&(t.classList.add(i<=n.selectedDates[0].getTime()?"startRange":"endRange"),r<i&&o===r?e.classList.add("startRange"):r>i&&o===r&&e.classList.add("endRange"),o>=l&&(0===u||o<=u)&&C(o,r,i)&&e.classList.add("inRange")))}))}}function ut(){!n.isOpen||n.config.static||n.config.inline||ft()}function ct(t){return function(e){var i=n.config["_"+t+"Date"]=n.parseDate(e,n.config.dateFormat),r=n.config["_"+("min"===t?"max":"min")+"Date"];void 0!==i&&(n["min"===t?"minDateHasTime":"maxDateHasTime"]=i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((function(t){return rt(t)})),n.selectedDates.length||"min"!==t||D(i),Tt()),n.daysContainer&&(pt(),void 0!==i?n.currentYearElement[t]=i.getFullYear().toString():n.currentYearElement.removeAttribute(t),n.currentYearElement.disabled=!!r&&void 0!==i&&r.getFullYear()===i.getFullYear())}}function ht(){return n.config.wrap?t.querySelector("[data-input]"):t}function dt(){"object"!=typeof n.config.locale&&void 0===j.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=L(L({},j.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?j.l10ns[n.config.locale]:void 0),_.D="("+n.l10n.weekdays.shorthand.join("|")+")",_.l="("+n.l10n.weekdays.longhand.join("|")+")",_.M="("+n.l10n.months.shorthand.join("|")+")",_.F="("+n.l10n.months.longhand.join("|")+")",_.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")",void 0===L(L({},e),JSON.parse(JSON.stringify(t.dataset||{}))).time_24hr&&void 0===j.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=x(n),n.parseDate=k({config:n.config,l10n:n.l10n})}function ft(t){if("function"!=typeof n.config.position){if(void 0!==n.calendarContainer){wt("onPreCalendarPosition");var e=t||n._positionElement,i=Array.prototype.reduce.call(n.calendarContainer.children,(function(t,e){return t+e.offsetHeight}),0),r=n.calendarContainer.offsetWidth,o=n.config.position.split(" "),a=o[0],s=o.length>1?o[1]:null,l=e.getBoundingClientRect(),u=window.innerHeight-l.bottom,c="above"===a||"below"!==a&&u<i&&l.top>i,d=window.pageYOffset+l.top+(c?-i-2:e.offsetHeight+2);if(h(n.calendarContainer,"arrowTop",!c),h(n.calendarContainer,"arrowBottom",c),!n.config.inline){var f=window.pageXOffset+l.left,p=!1,m=!1;"center"===s?(f-=(r-l.width)/2,p=!0):"right"===s&&(f-=r-l.width,m=!0),h(n.calendarContainer,"arrowLeft",!p&&!m),h(n.calendarContainer,"arrowCenter",p),h(n.calendarContainer,"arrowRight",m);var g=window.document.body.offsetWidth-(window.pageXOffset+l.right),v=f+r>window.document.body.offsetWidth,y=g+r>window.document.body.offsetWidth;if(h(n.calendarContainer,"rightMost",v),!n.config.static)if(n.calendarContainer.style.top=d+"px",v)if(y){var b=function(){for(var t=null,e=0;e<document.styleSheets.length;e++){var n=document.styleSheets[e];if(n.cssRules){try{n.cssRules}catch(t){continue}t=n;break}}return null!=t?t:(i=document.createElement("style"),document.head.appendChild(i),i.sheet);var i}();if(void 0===b)return;var _=window.document.body.offsetWidth,w=Math.max(0,_/2-r/2),x=b.cssRules.length,k="{left:"+l.left+"px;right:auto;}";h(n.calendarContainer,"rightMost",!1),h(n.calendarContainer,"centerMost",!0),b.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+k,x),n.calendarContainer.style.left=w+"px",n.calendarContainer.style.right="auto"}else n.calendarContainer.style.left="auto",n.calendarContainer.style.right=g+"px";else n.calendarContainer.style.left=f+"px",n.calendarContainer.style.right="auto"}}}else n.config.position(n,t)}function pt(){n.config.noCalendar||n.isMobile||(G(),St(),$())}function mt(){n._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(n.close,0):n.close()}function gt(t){t.preventDefault(),t.stopPropagation();var e=p(g(t),(function(t){return t.classList&&t.classList.contains("flatpickr-day")&&!t.classList.contains("flatpickr-disabled")&&!t.classList.contains("notAllowed")}));if(void 0!==e){var i=e,r=n.latestSelectedDateObj=new Date(i.dateObj.getTime()),o=(r.getMonth()<n.currentMonth||r.getMonth()>n.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=i,"single"===n.config.mode)n.selectedDates=[r];else if("multiple"===n.config.mode){var a=kt(r);a?n.selectedDates.splice(parseInt(a),1):n.selectedDates.push(r)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=r,n.selectedDates.push(r),0!==S(r,n.selectedDates[0],!0)&&n.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()})));if(N(),o){var s=n.currentYear!==r.getFullYear();n.currentYear=r.getFullYear(),n.currentMonth=r.getMonth(),s&&(wt("onYearChange"),G()),wt("onMonthChange")}if(St(),$(),Tt(),o||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():U(i),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){var l="single"===n.config.mode&&!n.config.enableTime,u="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(l||u)&&mt()}B()}}n.parseDate=k({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=F,n._setHoursFromDate=D,n._positionCalendar=ft,n.changeMonth=tt,n.changeYear=it,n.clear=function(t,e){void 0===t&&(t=!0);void 0===e&&(e=!0);n.input.value="",void 0!==n.altInput&&(n.altInput.value="");void 0!==n.mobileInput&&(n.mobileInput.value="");n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===e&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth());if(!0===n.config.enableTime){var i=A(n.config);I(i.hours,i.minutes,i.seconds)}n.redraw(),t&&wt("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active"));wt("onClose")},n.onMouseOver=lt,n._createElement=d,n.createDay=W,n.destroy=function(){void 0!==n.config&&wt("onDestroy");for(var t=n._handlers.length;t--;)n._handlers[t].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var e=n.calendarContainer.parentNode;if(e.lastChild&&e.removeChild(e.lastChild),e.parentNode){for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput);n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(t){try{delete n[t]}catch(t){}}))},n.isEnabled=rt,n.jumpToDate=z,n.updateValue=Tt,n.open=function(t,e){void 0===e&&(e=n._positionElement);if(!0===n.isMobile){if(t){t.preventDefault();var i=g(t);i&&i.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void wt("onOpen")}if(n._input.disabled||n.config.inline)return;var r=n.isOpen;n.isOpen=!0,r||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),wt("onOpen"),ft(e));!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==t&&n.timeContainer.contains(t.relatedTarget)||setTimeout((function(){return n.hourElement.select()}),50))},n.redraw=pt,n.set=function(t,e){if(null!==t&&"object"==typeof t)for(var r in Object.assign(n.config,t),t)void 0!==vt[r]&&vt[r].forEach((function(t){return t()}));else n.config[t]=e,void 0!==vt[t]?vt[t].forEach((function(t){return t()})):i.indexOf(t)>-1&&(n.config[t]=c(e));n.redraw(),Tt(!0)},n.setDate=function(t,e,i){void 0===e&&(e=!1);void 0===i&&(i=n.config.dateFormat);if(0!==t&&!t||t instanceof Array&&0===t.length)return n.clear(e);yt(t,i),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),z(void 0,e),D(),0===n.selectedDates.length&&n.clear(!1);Tt(e),e&&wt("onChange")},n.toggle=function(t){if(!0===n.isOpen)return n.close();n.open(t)};var vt={locale:[dt,Q],showMonths:[X,b,J],minDate:[z],maxDate:[z],positionElement:[_t],clickOpens:[function(){!0===n.config.clickOpens?(F(n._input,"focus",n.open),F(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function yt(t,e){var i=[];if(t instanceof Array)i=t.map((function(t){return n.parseDate(t,e)}));else if(t instanceof Date||"number"==typeof t)i=[n.parseDate(t,e)];else if("string"==typeof t)switch(n.config.mode){case"single":case"time":i=[n.parseDate(t,e)];break;case"multiple":i=t.split(n.config.conjunction).map((function(t){return n.parseDate(t,e)}));break;case"range":i=t.split(n.l10n.rangeSeparator).map((function(t){return n.parseDate(t,e)}))}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));n.selectedDates=n.config.allowInvalidPreload?i:i.filter((function(t){return t instanceof Date&&rt(t,!1)})),"range"===n.config.mode&&n.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}function bt(t){return t.slice().map((function(t){return"string"==typeof t||"number"==typeof t||t instanceof Date?n.parseDate(t,void 0,!0):t&&"object"==typeof t&&t.from&&t.to?{from:n.parseDate(t.from,void 0),to:n.parseDate(t.to,void 0)}:t})).filter((function(t){return t}))}function _t(){n._positionElement=n.config.positionElement||n._input}function wt(t,e){if(void 0!==n.config){var i=n.config[t];if(void 0!==i&&i.length>0)for(var r=0;i[r]&&r<i.length;r++)i[r](n.selectedDates,n.input.value,n,e);"onChange"===t&&(n.input.dispatchEvent(xt("change")),n.input.dispatchEvent(xt("input")))}}function xt(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e}function kt(t){for(var e=0;e<n.selectedDates.length;e++){var i=n.selectedDates[e];if(i instanceof Date&&0===S(i,t))return""+e}return!1}function St(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach((function(t,e){var i=new Date(n.currentYear,n.currentMonth,1);i.setMonth(n.currentMonth+e),n.config.showMonths>1||"static"===n.config.monthSelectorType?n.monthElements[e].textContent=y(i.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=i.getMonth().toString(),t.value=i.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=void 0!==n.config.maxDate&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Ct(t){var e=t||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map((function(t){return n.formatDate(t,e)})).filter((function(t,e,i){return"range"!==n.config.mode||n.config.enableTime||i.indexOf(t)===e})).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function Tt(t){void 0===t&&(t=!0),void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Ct(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=Ct(n.config.altFormat)),!1!==t&&wt("onValueUpdate")}function Ot(t){var e=g(t),i=n.prevMonthNav.contains(e),r=n.nextMonthNav.contains(e);i||r?tt(i?-1:1):n.yearElements.indexOf(e)>=0?e.select():e.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):e.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=t,n.isOpen=!1,function(){var o=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=L(L({},JSON.parse(JSON.stringify(t.dataset||{}))),e),s={};n.config.parseDate=a.parseDate,n.config.formatDate=a.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(t){n.config._enable=bt(t)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(t){n.config._disable=bt(t)}});var l="time"===a.mode;if(!a.dateFormat&&(a.enableTime||l)){var u=j.defaultConfig.dateFormat||r.dateFormat;s.dateFormat=a.noCalendar||l?"H:i"+(a.enableSeconds?":S":""):u+" H:i"+(a.enableSeconds?":S":"")}if(a.altInput&&(a.enableTime||l)&&!a.altFormat){var h=j.defaultConfig.altFormat||r.altFormat;s.altFormat=a.noCalendar||l?"h:i"+(a.enableSeconds?":S K":" K"):h+" h:i"+(a.enableSeconds?":S":"")+" K"}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:ct("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:ct("max")});var d=function(t){return function(e){n.config["min"===t?"_minTime":"_maxTime"]=n.parseDate(e,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:d("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:d("max")}),"time"===a.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0);Object.assign(n.config,s,a);for(var f=0;f<o.length;f++)n.config[o[f]]=!0===n.config[o[f]]||"true"===n.config[o[f]];i.filter((function(t){return void 0!==n.config[t]})).forEach((function(t){n.config[t]=c(n.config[t]||[]).map(v)})),n.isMobile=!n.config.disableMobile&&!n.config.inline&&"single"===n.config.mode&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(f=0;f<n.config.plugins.length;f++){var p=n.config.plugins[f](n)||{};for(var m in p)i.indexOf(m)>-1?n.config[m]=c(p[m]).map(v).concat(n.config[m]):void 0===a[m]&&(n.config[m]=p[m])}a.altInputClass||(n.config.altInputClass=ht().className+" "+n.config.altInputClass);wt("onParseConfig")}(),dt(),function(){if(n.input=ht(),!n.input)return void n.config.errorHandler(new Error("Invalid input element specified"));n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=d(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling));n.config.allowInput||n._input.setAttribute("readonly","readonly");_t()}(),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var t=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);t&&yt(t,n.config.dateFormat);n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]);void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i"));void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i"));n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:function(t,e){return void 0===t&&(t=n.currentMonth),void 0===e&&(e=n.currentYear),1===t&&(e%4==0&&e%100!=0||e%400==0)?29:n.l10n.daysInMonth[t]}},n.isMobile||function(){var t=window.document.createDocumentFragment();if(n.calendarContainer=d("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(t.appendChild((n.monthNav=d("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=d("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=d("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,X(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(t){n.__hidePrevMonthArrow!==t&&(h(n.prevMonthNav,"flatpickr-disabled",t),n.__hidePrevMonthArrow=t)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(t){n.__hideNextMonthArrow!==t&&(h(n.nextMonthNav,"flatpickr-disabled",t),n.__hideNextMonthArrow=t)}}),n.currentYearElement=n.yearElements[0],St(),n.monthNav)),n.innerContainer=d("div","flatpickr-innerContainer"),n.config.weekNumbers){var e=function(){n.calendarContainer.classList.add("hasWeeks");var t=d("div","flatpickr-weekwrapper");t.appendChild(d("span","flatpickr-weekday",n.l10n.weekAbbreviation));var e=d("div","flatpickr-weeks");return t.appendChild(e),{weekWrapper:t,weekNumbers:e}}(),i=e.weekWrapper,r=e.weekNumbers;n.innerContainer.appendChild(i),n.weekNumbers=r,n.weekWrapper=i}n.rContainer=d("div","flatpickr-rContainer"),n.rContainer.appendChild(J()),n.daysContainer||(n.daysContainer=d("div","flatpickr-days"),n.daysContainer.tabIndex=-1),$(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),t.appendChild(n.innerContainer)}n.config.enableTime&&t.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var t=A(n.config);n.timeContainer=d("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var e=d("span","flatpickr-time-separator",":"),i=m("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=i.getElementsByTagName("input")[0];var r=m("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});n.minuteElement=r.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?t.hours:function(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}(t.hours)),n.minuteElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():t.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(i),n.timeContainer.appendChild(e),n.timeContainer.appendChild(r),n.config.time_24hr&&n.timeContainer.classList.add("time24hr");if(n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var o=m("flatpickr-second");n.secondElement=o.getElementsByTagName("input")[0],n.secondElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():t.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(o)}n.config.time_24hr||(n.amPM=d("span","flatpickr-am-pm",n.l10n.amPM[l((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM));return n.timeContainer}());h(n.calendarContainer,"rangeMode","range"===n.config.mode),h(n.calendarContainer,"animate",!0===n.config.animate),h(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(t);var o=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!o&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var a=d("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(a,n.element),a.appendChild(n.element),n.altInput&&a.appendChild(n.altInput),a.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){n.config.wrap&&["open","close","toggle","clear"].forEach((function(t){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+t+"]"),(function(e){return F(e,"click",n[t])}))}));if(n.isMobile)return void function(){var t=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=d("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=t,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===t?"Y-m-d\\TH:i:S":"date"===t?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr));n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d"));n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d"));n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step")));n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(t){}F(n.mobileInput,"change",(function(t){n.setDate(g(t).value,!1,n.mobileFormatStr),wt("onChange"),wt("onClose")}))}();var t=u(ut,50);n._debouncedChange=u(B,P),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&F(n.daysContainer,"mouseover",(function(t){"range"===n.config.mode&&lt(g(t))}));F(n._input,"keydown",st),void 0!==n.calendarContainer&&F(n.calendarContainer,"keydown",st);n.config.inline||n.config.static||F(window,"resize",t);void 0!==window.ontouchstart?F(window.document,"touchstart",nt):F(window.document,"mousedown",nt);F(window.document,"focus",nt,{capture:!0}),!0===n.config.clickOpens&&(F(n._input,"focus",n.open),F(n._input,"click",n.open));void 0!==n.daysContainer&&(F(n.monthNav,"click",Ot),F(n.monthNav,["keyup","increment"],R),F(n.daysContainer,"click",gt));if(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){var e=function(t){return g(t).select()};F(n.timeContainer,["increment"],w),F(n.timeContainer,"blur",w,{capture:!0}),F(n.timeContainer,"click",q),F([n.hourElement,n.minuteElement],["focus","click"],e),void 0!==n.secondElement&&F(n.secondElement,"focus",(function(){return n.secondElement&&n.secondElement.select()})),void 0!==n.amPM&&F(n.amPM,"click",(function(t){w(t)}))}n.config.allowInput&&F(n._input,"blur",at)}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&D(n.config.noCalendar?n.latestSelectedDateObj:void 0),Tt(!1)),b();var o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&o&&ft(),wt("onReady")}(),n}function D(t,e){for(var n=Array.prototype.slice.call(t).filter((function(t){return t instanceof HTMLElement})),i=[],r=0;r<n.length;r++){var o=n[r];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=N(o,e||{}),i.push(o._flatpickr)}catch(t){}}return 1===i.length?i[0]:i}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return D(this,t)},HTMLElement.prototype.flatpickr=function(t){return D([this],t)});var j=function(t,e){return"string"==typeof t?D(window.document.querySelectorAll(t),e):t instanceof Node?D([t],e):D(t,e)};j.defaultConfig={},j.l10ns={en:L({},a),default:L({},a)},j.localize=function(t){j.l10ns.default=L(L({},j.l10ns.default),t)},j.setDefaults=function(t){j.defaultConfig=L(L({},j.defaultConfig),t)},j.parseDate=k({}),j.formatDate=x({}),j.compareDates=S,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(t){return D(this,t)}),Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof t?parseInt(t,10):t))},"undefined"!=typeof window&&(window.flatpickr=j);const I=j},5990:()=>{"use strict";"function"!=typeof Object.assign&&(Object.assign=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var i=function(e){e&&Object.keys(e).forEach((function(n){return t[n]=e[n]}))},r=0,o=e;r<o.length;r++){i(o[r])}return t})},6208:function(t,e){!function(t){"use strict";var e=function(){return e=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},e.apply(this,arguments)},n="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},i={weekdays:{shorthand:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],longhand:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]},months:{shorthand:["1","2","3","4","5","6","7","8","9","10","11","12"],longhand:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]},firstDayOfWeek:6,rangeSeparator:" إلى ",weekAbbreviation:"Wk",scrollTitle:"قم بالتمرير للزيادة",toggleTitle:"اضغط للتبديل",amPM:["ص","م"],yearAriaLabel:"سنة",monthAriaLabel:"شهر",hourAriaLabel:"ساعة",minuteAriaLabel:"دقيقة",time_24hr:!1};n.l10ns.ar=i,n.l10ns;var r="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},o={weekdays:{shorthand:["So","Mo","Di","Mi","Do","Fr","Sa"],longhand:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},months:{shorthand:["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],longhand:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},firstDayOfWeek:1,weekAbbreviation:"KW",rangeSeparator:" bis ",scrollTitle:"Zum Ändern scrollen",toggleTitle:"Zum Umschalten klicken",time_24hr:!0};r.l10ns.at=o,r.l10ns;var a="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},s={weekdays:{shorthand:["B.","B.e.","Ç.a.","Ç.","C.a.","C.","Ş."],longhand:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},months:{shorthand:["Yan","Fev","Mar","Apr","May","İyn","İyl","Avq","Sen","Okt","Noy","Dek"],longhand:["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" - ",weekAbbreviation:"Hf",scrollTitle:"Artırmaq üçün sürüşdürün",toggleTitle:"Aç / Bağla",amPM:["GƏ","GS"],time_24hr:!0};a.l10ns.az=s,a.l10ns;var l="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},u={weekdays:{shorthand:["Нд","Пн","Аў","Ср","Чц","Пт","Сб"],longhand:["Нядзеля","Панядзелак","Аўторак","Серада","Чацвер","Пятніца","Субота"]},months:{shorthand:["Сту","Лют","Сак","Кра","Тра","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне"],longhand:["Студзень","Люты","Сакавік","Красавік","Травень","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Тыд.",scrollTitle:"Пракруціце для павелічэння",toggleTitle:"Націсніце для пераключэння",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};l.l10ns.be=u,l.l10ns;var c="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},h={firstDayOfWeek:1,weekdays:{shorthand:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],longhand:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Mart","April","Maj","Juni","Juli","Avgust","Septembar","Oktobar","Novembar","Decembar"]},time_24hr:!0};c.l10ns.bs=h,c.l10ns;var d="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},f={weekdays:{shorthand:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"]},months:{shorthand:["Яну","Фев","Март","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],longhand:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"]},time_24hr:!0,firstDayOfWeek:1};d.l10ns.bg=f,d.l10ns;var p="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},m={weekdays:{shorthand:["রবি","সোম","মঙ্গল","বুধ","বৃহস্পতি","শুক্র","শনি"],longhand:["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"]},months:{shorthand:["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ","সেপ্টে","অক্টো","নভে","ডিসে"],longhand:["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"]}};p.l10ns.bn=m,p.l10ns;var g="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},v={weekdays:{shorthand:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],longhand:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},months:{shorthand:["Gen","Febr","Març","Abr","Maig","Juny","Jul","Ag","Set","Oct","Nov","Des"],longhand:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"]},ordinal:function(t){var e=t%100;if(e>3&&e<21)return"è";switch(e%10){case 1:case 3:return"r";case 2:return"n";case 4:return"t";default:return"è"}},firstDayOfWeek:1,rangeSeparator:" a ",time_24hr:!0};g.l10ns.cat=g.l10ns.ca=v,g.l10ns;var y="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},b={weekdays:{shorthand:["یەکشەممە","دووشەممە","سێشەممە","چوارشەممە","پێنجشەممە","هەینی","شەممە"],longhand:["یەکشەممە","دووشەممە","سێشەممە","چوارشەممە","پێنجشەممە","هەینی","شەممە"]},months:{shorthand:["ڕێبەندان","ڕەشەمە","نەورۆز","گوڵان","جۆزەردان","پووشپەڕ","گەلاوێژ","خەرمانان","ڕەزبەر","گەڵاڕێزان","سەرماوەز","بەفرانبار"],longhand:["ڕێبەندان","ڕەشەمە","نەورۆز","گوڵان","جۆزەردان","پووشپەڕ","گەلاوێژ","خەرمانان","ڕەزبەر","گەڵاڕێزان","سەرماوەز","بەفرانبار"]},firstDayOfWeek:6,ordinal:function(){return""}};y.l10ns.ckb=b,y.l10ns;var _="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},w={weekdays:{shorthand:["Ne","Po","Út","St","Čt","Pá","So"],longhand:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota"]},months:{shorthand:["Led","Ún","Bře","Dub","Kvě","Čer","Čvc","Srp","Zář","Říj","Lis","Pro"],longhand:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" do ",weekAbbreviation:"Týd.",scrollTitle:"Rolujte pro změnu",toggleTitle:"Přepnout dopoledne/odpoledne",amPM:["dop.","odp."],yearAriaLabel:"Rok",time_24hr:!0};_.l10ns.cs=w,_.l10ns;var x="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},k={weekdays:{shorthand:["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],longhand:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"]},months:{shorthand:["Ion","Chwef","Maw","Ebr","Mai","Meh","Gorff","Awst","Medi","Hyd","Tach","Rhag"],longhand:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"]},firstDayOfWeek:1,ordinal:function(t){return 1===t?"af":2===t?"ail":3===t||4===t?"ydd":5===t||6===t?"ed":t>=7&&t<=10||12==t||15==t||18==t||20==t?"fed":11==t||13==t||14==t||16==t||17==t||19==t?"eg":t>=21&&t<=39?"ain":""},time_24hr:!0};x.l10ns.cy=k,x.l10ns;var S="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},C={weekdays:{shorthand:["søn","man","tir","ons","tors","fre","lør"],longhand:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},months:{shorthand:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],longhand:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"uge",time_24hr:!0};S.l10ns.da=C,S.l10ns;var T="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},O={weekdays:{shorthand:["So","Mo","Di","Mi","Do","Fr","Sa"],longhand:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},months:{shorthand:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],longhand:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},firstDayOfWeek:1,weekAbbreviation:"KW",rangeSeparator:" bis ",scrollTitle:"Zum Ändern scrollen",toggleTitle:"Zum Umschalten klicken",time_24hr:!0};T.l10ns.de=O,T.l10ns;var E={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},A="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},L={firstDayOfWeek:1,rangeSeparator:" ĝis ",weekAbbreviation:"Sem",scrollTitle:"Rulumu por pligrandigi la valoron",toggleTitle:"Klaku por ŝalti",weekdays:{shorthand:["Dim","Lun","Mar","Mer","Ĵaŭ","Ven","Sab"],longhand:["dimanĉo","lundo","mardo","merkredo","ĵaŭdo","vendredo","sabato"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aŭg","Sep","Okt","Nov","Dec"],longhand:["januaro","februaro","marto","aprilo","majo","junio","julio","aŭgusto","septembro","oktobro","novembro","decembro"]},ordinal:function(){return"-a"},time_24hr:!0};A.l10ns.eo=L,A.l10ns;var M="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},P={weekdays:{shorthand:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],longhand:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},months:{shorthand:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],longhand:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]},ordinal:function(){return"º"},firstDayOfWeek:1,rangeSeparator:" a ",time_24hr:!0};M.l10ns.es=P,M.l10ns;var N="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},D={weekdays:{shorthand:["P","E","T","K","N","R","L"],longhand:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},months:{shorthand:["Jaan","Veebr","Märts","Apr","Mai","Juuni","Juuli","Aug","Sept","Okt","Nov","Dets"],longhand:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"]},firstDayOfWeek:1,ordinal:function(){return"."},weekAbbreviation:"Näd",rangeSeparator:" kuni ",scrollTitle:"Keri, et suurendada",toggleTitle:"Klõpsa, et vahetada",time_24hr:!0};N.l10ns.et=D,N.l10ns;var j="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},I={weekdays:{shorthand:["یک","دو","سه","چهار","پنج","جمعه","شنبه"],longhand:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنچ‌شنبه","جمعه","شنبه"]},months:{shorthand:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],longhand:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"]},firstDayOfWeek:6,ordinal:function(){return""}};j.l10ns.fa=I,j.l10ns;var R="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},F={firstDayOfWeek:1,weekdays:{shorthand:["su","ma","ti","ke","to","pe","la"],longhand:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},months:{shorthand:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],longhand:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]},ordinal:function(){return"."},time_24hr:!0};R.l10ns.fi=F,R.l10ns;var B="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},z={weekdays:{shorthand:["Sun","Mán","Týs","Mik","Hós","Frí","Ley"],longhand:["Sunnudagur","Mánadagur","Týsdagur","Mikudagur","Hósdagur","Fríggjadagur","Leygardagur"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","Apríl","Mai","Juni","Juli","August","Septembur","Oktobur","Novembur","Desembur"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"vika",scrollTitle:"Rulla fyri at broyta",toggleTitle:"Trýst fyri at skifta",yearAriaLabel:"Ár",time_24hr:!0};B.l10ns.fo=z,B.l10ns;var q="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},H={firstDayOfWeek:1,weekdays:{shorthand:["dim","lun","mar","mer","jeu","ven","sam"],longhand:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},months:{shorthand:["janv","févr","mars","avr","mai","juin","juil","août","sept","oct","nov","déc"],longhand:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},ordinal:function(t){return t>1?"":"er"},rangeSeparator:" au ",weekAbbreviation:"Sem",scrollTitle:"Défiler pour augmenter la valeur",toggleTitle:"Cliquer pour basculer",time_24hr:!0};q.l10ns.fr=H,q.l10ns;var W="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},U={weekdays:{shorthand:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],longhand:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},months:{shorthand:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],longhand:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},firstDayOfWeek:1,ordinal:function(){return""},weekAbbreviation:"Εβδ",rangeSeparator:" έως ",scrollTitle:"Μετακυλήστε για προσαύξηση",toggleTitle:"Κάντε κλικ για αλλαγή",amPM:["ΠΜ","ΜΜ"],yearAriaLabel:"χρόνος",monthAriaLabel:"μήνας",hourAriaLabel:"ώρα",minuteAriaLabel:"λεπτό"};W.l10ns.gr=U,W.l10ns;var V="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Z={weekdays:{shorthand:["א","ב","ג","ד","ה","ו","ש"],longhand:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"]},months:{shorthand:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"],longhand:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"]},rangeSeparator:" אל ",time_24hr:!0};V.l10ns.he=Z,V.l10ns;var Y="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},$={weekdays:{shorthand:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],longhand:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"]},months:{shorthand:["जन","फर","मार्च","अप्रेल","मई","जून","जूलाई","अग","सित","अक्ट","नव","दि"],longhand:["जनवरी ","फरवरी","मार्च","अप्रेल","मई","जून","जूलाई","अगस्त ","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"]}};Y.l10ns.hi=$,Y.l10ns;var G="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},K={firstDayOfWeek:1,weekdays:{shorthand:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],longhand:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},months:{shorthand:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],longhand:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"]},time_24hr:!0};G.l10ns.hr=K,G.l10ns;var X="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},J={firstDayOfWeek:1,weekdays:{shorthand:["V","H","K","Sz","Cs","P","Szo"],longhand:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"]},months:{shorthand:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],longhand:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"]},ordinal:function(){return"."},weekAbbreviation:"Hét",scrollTitle:"Görgessen",toggleTitle:"Kattintson a váltáshoz",rangeSeparator:" - ",time_24hr:!0};X.l10ns.hu=J,X.l10ns;var Q="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},tt={weekdays:{shorthand:["Կիր","Երկ","Երք","Չրք","Հնգ","Ուրբ","Շբթ"],longhand:["Կիրակի","Եկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"]},months:{shorthand:["Հնվ","Փտր","Մար","Ապր","Մայ","Հնս","Հլս","Օգս","Սեպ","Հոկ","Նմբ","Դեկ"],longhand:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"ՇԲՏ",scrollTitle:"Ոլորեք՝ մեծացնելու համար",toggleTitle:"Սեղմեք՝ փոխելու համար",amPM:["ՄԿ","ԿՀ"],yearAriaLabel:"Տարի",monthAriaLabel:"Ամիս",hourAriaLabel:"Ժամ",minuteAriaLabel:"Րոպե",time_24hr:!0};Q.l10ns.hy=tt,Q.l10ns;var et="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},nt={weekdays:{shorthand:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],longhand:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],longhand:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},firstDayOfWeek:1,ordinal:function(){return""},time_24hr:!0,rangeSeparator:" - "};et.l10ns.id=nt,et.l10ns;var it="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},rt={weekdays:{shorthand:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],longhand:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],longhand:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"]},ordinal:function(){return"."},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"vika",yearAriaLabel:"Ár",time_24hr:!0};it.l10ns.is=rt,it.l10ns;var ot="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},at={weekdays:{shorthand:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],longhand:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},months:{shorthand:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],longhand:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},firstDayOfWeek:1,ordinal:function(){return"°"},rangeSeparator:" al ",weekAbbreviation:"Se",scrollTitle:"Scrolla per aumentare",toggleTitle:"Clicca per cambiare",time_24hr:!0};ot.l10ns.it=at,ot.l10ns;var st="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},lt={weekdays:{shorthand:["日","月","火","水","木","金","土"],longhand:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},months:{shorthand:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],longhand:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},time_24hr:!0,rangeSeparator:" から ",monthAriaLabel:"月",amPM:["午前","午後"],yearAriaLabel:"年",hourAriaLabel:"時間",minuteAriaLabel:"分"};st.l10ns.ja=lt,st.l10ns;var ut="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ct={weekdays:{shorthand:["კვ","ორ","სა","ოთ","ხუ","პა","შა"],longhand:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]},months:{shorthand:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],longhand:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"კვ.",scrollTitle:"დასქროლეთ გასადიდებლად",toggleTitle:"დააკლიკეთ გადართვისთვის",amPM:["AM","PM"],yearAriaLabel:"წელი",time_24hr:!0};ut.l10ns.ka=ct,ut.l10ns;var ht="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},dt={weekdays:{shorthand:["일","월","화","수","목","금","토"],longhand:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},months:{shorthand:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],longhand:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},ordinal:function(){return"일"},rangeSeparator:" ~ ",amPM:["오전","오후"]};ht.l10ns.ko=dt,ht.l10ns;var ft="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},pt={weekdays:{shorthand:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស.","សុក្រ","សៅរ៍"],longhand:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"]},months:{shorthand:["មករា","កុម្ភះ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],longhand:["មករា","កុម្ភះ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"]},ordinal:function(){return""},firstDayOfWeek:1,rangeSeparator:" ដល់ ",weekAbbreviation:"សប្តាហ៍",scrollTitle:"រំកិលដើម្បីបង្កើន",toggleTitle:"ចុចដើម្បីផ្លាស់ប្ដូរ",yearAriaLabel:"ឆ្នាំ",time_24hr:!0};ft.l10ns.km=pt,ft.l10ns;var mt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},gt={weekdays:{shorthand:["Жс","Дс","Сc","Ср","Бс","Жм","Сб"],longhand:["Жексенбi","Дүйсенбi","Сейсенбi","Сәрсенбi","Бейсенбi","Жұма","Сенбi"]},months:{shorthand:["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шiл","Там","Қыр","Қаз","Қар","Жел"],longhand:["Қаңтар","Ақпан","Наурыз","Сәуiр","Мамыр","Маусым","Шiлде","Тамыз","Қыркүйек","Қазан","Қараша","Желтоқсан"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Апта",scrollTitle:"Үлкейту үшін айналдырыңыз",toggleTitle:"Ауыстыру үшін басыңыз",amPM:["ТД","ТК"],yearAriaLabel:"Жыл"};mt.l10ns.kz=gt,mt.l10ns;var vt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},yt={weekdays:{shorthand:["S","Pr","A","T","K","Pn","Š"],longhand:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"]},months:{shorthand:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd"],longhand:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"]},firstDayOfWeek:1,ordinal:function(){return"-a"},rangeSeparator:" iki ",weekAbbreviation:"Sav",scrollTitle:"Keisti laiką pelės rateliu",toggleTitle:"Perjungti laiko formatą",time_24hr:!0};vt.l10ns.lt=yt,vt.l10ns;var bt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},_t={firstDayOfWeek:1,weekdays:{shorthand:["Sv","Pr","Ot","Tr","Ce","Pk","Se"],longhand:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],longhand:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"]},rangeSeparator:" līdz ",time_24hr:!0};bt.l10ns.lv=_t,bt.l10ns;var wt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},xt={weekdays:{shorthand:["Не","По","Вт","Ср","Че","Пе","Са"],longhand:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"]},months:{shorthand:["Јан","Фев","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Ное","Дек"],longhand:["Јануари","Февруари","Март","Април","Мај","Јуни","Јули","Август","Септември","Октомври","Ноември","Декември"]},firstDayOfWeek:1,weekAbbreviation:"Нед.",rangeSeparator:" до ",time_24hr:!0};wt.l10ns.mk=xt,wt.l10ns;var kt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},St={firstDayOfWeek:1,weekdays:{shorthand:["Да","Мя","Лх","Пү","Ба","Бя","Ня"],longhand:["Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням"]},months:{shorthand:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],longhand:["Нэгдүгээр сар","Хоёрдугаар сар","Гуравдугаар сар","Дөрөвдүгээр сар","Тавдугаар сар","Зургаадугаар сар","Долдугаар сар","Наймдугаар сар","Есдүгээр сар","Аравдугаар сар","Арваннэгдүгээр сар","Арванхоёрдугаар сар"]},rangeSeparator:"-с ",time_24hr:!0};kt.l10ns.mn=St,kt.l10ns;var Ct="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Tt={weekdays:{shorthand:["Aha","Isn","Sel","Rab","Kha","Jum","Sab"],longhand:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"]},months:{shorthand:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],longhand:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"]},firstDayOfWeek:1,ordinal:function(){return""}};Ct.l10ns;var Ot="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Et={weekdays:{shorthand:["နွေ","လာ","ဂါ","ဟူး","ကြာ","သော","နေ"],longhand:["တနင်္ဂနွေ","တနင်္လာ","အင်္ဂါ","ဗုဒ္ဓဟူး","ကြာသပတေး","သောကြာ","စနေ"]},months:{shorthand:["ဇန်","ဖေ","မတ်","ပြီ","မေ","ဇွန်","လိုင်","သြ","စက်","အောက်","နို","ဒီ"],longhand:["ဇန်နဝါရီ","ဖေဖော်ဝါရီ","မတ်","ဧပြီ","မေ","ဇွန်","ဇူလိုင်","သြဂုတ်","စက်တင်ဘာ","အောက်တိုဘာ","နိုဝင်ဘာ","ဒီဇင်ဘာ"]},firstDayOfWeek:1,ordinal:function(){return""},time_24hr:!0};Ot.l10ns.my=Et,Ot.l10ns;var At="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Lt={weekdays:{shorthand:["zo","ma","di","wo","do","vr","za"],longhand:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},months:{shorthand:["jan","feb","mrt","apr","mei","jun","jul","aug","sept","okt","nov","dec"],longhand:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},firstDayOfWeek:1,weekAbbreviation:"wk",rangeSeparator:" t/m ",scrollTitle:"Scroll voor volgende / vorige",toggleTitle:"Klik om te wisselen",time_24hr:!0,ordinal:function(t){return 1===t||8===t||t>=20?"ste":"de"}};At.l10ns.nl=Lt,At.l10ns;var Mt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Pt={weekdays:{shorthand:["Sø.","Må.","Ty.","On.","To.","Fr.","La."],longhand:["Søndag","Måndag","Tysdag","Onsdag","Torsdag","Fredag","Laurdag"]},months:{shorthand:["Jan","Feb","Mars","Apr","Mai","Juni","Juli","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"]},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"Veke",scrollTitle:"Scroll for å endre",toggleTitle:"Klikk for å veksle",time_24hr:!0,ordinal:function(){return"."}};Mt.l10ns.nn=Pt,Mt.l10ns;var Nt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Dt={weekdays:{shorthand:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],longhand:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},months:{shorthand:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],longhand:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"]},firstDayOfWeek:1,rangeSeparator:" til ",weekAbbreviation:"Uke",scrollTitle:"Scroll for å endre",toggleTitle:"Klikk for å veksle",time_24hr:!0,ordinal:function(){return"."}};Nt.l10ns.no=Dt,Nt.l10ns;var jt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},It={weekdays:{shorthand:["ਐਤ","ਸੋਮ","ਮੰਗਲ","ਬੁੱਧ","ਵੀਰ","ਸ਼ੁੱਕਰ","ਸ਼ਨਿੱਚਰ"],longhand:["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁੱਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"]},months:{shorthand:["ਜਨ","ਫ਼ਰ","ਮਾਰ","ਅਪ੍ਰੈ","ਮਈ","ਜੂਨ","ਜੁਲਾ","ਅਗ","ਸਤੰ","ਅਕ","ਨਵੰ","ਦਸੰ"],longhand:["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ"]},time_24hr:!0};jt.l10ns.pa=It,jt.l10ns;var Rt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ft={weekdays:{shorthand:["Nd","Pn","Wt","Śr","Cz","Pt","So"],longhand:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"]},months:{shorthand:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],longhand:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"]},rangeSeparator:" do ",weekAbbreviation:"tydz.",scrollTitle:"Przewiń, aby zwiększyć",toggleTitle:"Kliknij, aby przełączyć",firstDayOfWeek:1,time_24hr:!0,ordinal:function(){return"."}};Rt.l10ns.pl=Ft,Rt.l10ns;var Bt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},zt={weekdays:{shorthand:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],longhand:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"]},months:{shorthand:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],longhand:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},rangeSeparator:" até ",time_24hr:!0};Bt.l10ns.pt=zt,Bt.l10ns;var qt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ht={weekdays:{shorthand:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],longhand:["Duminică","Luni","Marți","Miercuri","Joi","Vineri","Sâmbătă"]},months:{shorthand:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Noi","Dec"],longhand:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"]},firstDayOfWeek:1,time_24hr:!0,ordinal:function(){return""}};qt.l10ns.ro=Ht,qt.l10ns;var Wt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Ut={weekdays:{shorthand:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},months:{shorthand:["Янв","Фев","Март","Апр","Май","Июнь","Июль","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Нед.",scrollTitle:"Прокрутите для увеличения",toggleTitle:"Нажмите для переключения",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};Wt.l10ns.ru=Ut,Wt.l10ns;var Vt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Zt={weekdays:{shorthand:["ඉ","ස","අ","බ","බ්‍ර","සි","සෙ"],longhand:["ඉරිදා","සඳුදා","අඟහරුවාදා","බදාදා","බ්‍රහස්පතින්දා","සිකුරාදා","සෙනසුරාදා"]},months:{shorthand:["ජන","පෙබ","මාර්","අප්‍රේ","මැයි","ජුනි","ජූලි","අගෝ","සැප්","ඔක්","නොවැ","දෙසැ"],longhand:["ජනවාරි","පෙබරවාරි","මාර්තු","අප්‍රේල්","මැයි","ජුනි","ජූලි","අගෝස්තු","සැප්තැම්බර්","ඔක්තෝබර්","නොවැම්බර්","දෙසැම්බර්"]},time_24hr:!0};Vt.l10ns.si=Zt,Vt.l10ns;var Yt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},$t={weekdays:{shorthand:["Ned","Pon","Ut","Str","Štv","Pia","Sob"],longhand:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],longhand:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"]},firstDayOfWeek:1,rangeSeparator:" do ",time_24hr:!0,ordinal:function(){return"."}};Yt.l10ns.sk=$t,Yt.l10ns;var Gt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Kt={weekdays:{shorthand:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],longhand:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"]},firstDayOfWeek:1,rangeSeparator:" do ",time_24hr:!0,ordinal:function(){return"."}};Gt.l10ns.sl=Kt,Gt.l10ns;var Xt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},Jt={weekdays:{shorthand:["Di","Hë","Ma","Më","En","Pr","Sh"],longhand:["E Diel","E Hënë","E Martë","E Mërkurë","E Enjte","E Premte","E Shtunë"]},months:{shorthand:["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gus","Sht","Tet","Nën","Dhj"],longhand:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"]},firstDayOfWeek:1,rangeSeparator:" deri ",weekAbbreviation:"Java",yearAriaLabel:"Viti",monthAriaLabel:"Muaji",hourAriaLabel:"Ora",minuteAriaLabel:"Minuta",time_24hr:!0};Xt.l10ns.sq=Jt,Xt.l10ns;var Qt="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},te={weekdays:{shorthand:["Ned","Pon","Uto","Sre","Čet","Pet","Sub"],longhand:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"]},months:{shorthand:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],longhand:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"]},firstDayOfWeek:1,weekAbbreviation:"Ned.",rangeSeparator:" do ",time_24hr:!0};Qt.l10ns.sr=te,Qt.l10ns;var ee="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ne={firstDayOfWeek:1,weekAbbreviation:"v",weekdays:{shorthand:["sön","mån","tis","ons","tor","fre","lör"],longhand:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"]},months:{shorthand:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],longhand:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},rangeSeparator:" till ",time_24hr:!0,ordinal:function(){return"."}};ee.l10ns.sv=ne,ee.l10ns;var ie="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},re={weekdays:{shorthand:["อา","จ","อ","พ","พฤ","ศ","ส"],longhand:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"]},months:{shorthand:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],longhand:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"]},firstDayOfWeek:1,rangeSeparator:" ถึง ",scrollTitle:"เลื่อนเพื่อเพิ่มหรือลด",toggleTitle:"คลิกเพื่อเปลี่ยน",time_24hr:!0,ordinal:function(){return""}};ie.l10ns.th=re,ie.l10ns;var oe="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ae={weekdays:{shorthand:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],longhand:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},months:{shorthand:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],longhand:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]},firstDayOfWeek:1,ordinal:function(){return"."},rangeSeparator:" - ",weekAbbreviation:"Hf",scrollTitle:"Artırmak için kaydırın",toggleTitle:"Aç/Kapa",amPM:["ÖÖ","ÖS"],time_24hr:!0};oe.l10ns.tr=ae,oe.l10ns;var se="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},le={firstDayOfWeek:1,weekdays:{shorthand:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},months:{shorthand:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],longhand:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"]},time_24hr:!0};se.l10ns.uk=le,se.l10ns;var ue="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ce={weekdays:{shorthand:["Якш","Душ","Сеш","Чор","Пай","Жум","Шан"],longhand:["Якшанба","Душанба","Сешанба","Чоршанба","Пайшанба","Жума","Шанба"]},months:{shorthand:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Ҳафта",scrollTitle:"Катталаштириш учун айлантиринг",toggleTitle:"Ўтиш учун босинг",amPM:["AM","PM"],yearAriaLabel:"Йил",time_24hr:!0};ue.l10ns.uz=ce,ue.l10ns;var he="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},de={weekdays:{shorthand:["Ya","Du","Se","Cho","Pa","Ju","Sha"],longhand:["Yakshanba","Dushanba","Seshanba","Chorshanba","Payshanba","Juma","Shanba"]},months:{shorthand:["Yan","Fev","Mar","Apr","May","Iyun","Iyul","Avg","Sen","Okt","Noy","Dek"],longhand:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avgust","Sentabr","Oktabr","Noyabr","Dekabr"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Hafta",scrollTitle:"Kattalashtirish uchun aylantiring",toggleTitle:"O‘tish uchun bosing",amPM:["AM","PM"],yearAriaLabel:"Yil",time_24hr:!0};he.l10ns.uz_latn=de,he.l10ns;var fe="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},pe={weekdays:{shorthand:["CN","T2","T3","T4","T5","T6","T7"],longhand:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"]},months:{shorthand:["Th1","Th2","Th3","Th4","Th5","Th6","Th7","Th8","Th9","Th10","Th11","Th12"],longhand:["Tháng một","Tháng hai","Tháng ba","Tháng tư","Tháng năm","Tháng sáu","Tháng bảy","Tháng tám","Tháng chín","Tháng mười","Tháng mười một","Tháng mười hai"]},firstDayOfWeek:1,rangeSeparator:" đến "};fe.l10ns.vn=pe,fe.l10ns;var me="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ge={weekdays:{shorthand:["周日","周一","周二","周三","周四","周五","周六"],longhand:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},months:{shorthand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],longhand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},rangeSeparator:" 至 ",weekAbbreviation:"周",scrollTitle:"滚动切换",toggleTitle:"点击切换 12/24 小时时制"};me.l10ns.zh=ge,me.l10ns;var ve="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},ye={weekdays:{shorthand:["週日","週一","週二","週三","週四","週五","週六"],longhand:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},months:{shorthand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],longhand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},rangeSeparator:" 至 ",weekAbbreviation:"週",scrollTitle:"滾動切換",toggleTitle:"點擊切換 12/24 小時時制"};ve.l10ns.zh_tw=ye,ve.l10ns;var be={ar:i,at:o,az:s,be:u,bg:f,bn:m,bs:h,ca:v,ckb:b,cat:v,cs:w,cy:k,da:C,de:O,default:e({},E),en:E,eo:L,es:P,et:D,fa:I,fi:F,fo:z,fr:H,gr:U,he:Z,hi:$,hr:K,hu:J,hy:tt,id:nt,is:rt,it:at,ja:lt,ka:ct,ko:dt,km:pt,kz:gt,lt:yt,lv:_t,mk:xt,mn:St,ms:Tt,my:Et,nl:Lt,nn:Pt,no:Dt,pa:It,pl:Ft,pt:zt,ro:Ht,ru:Ut,si:Zt,sk:$t,sl:Kt,sq:Jt,sr:te,sv:ne,th:re,tr:ae,uk:le,vn:pe,zh:ge,zh_tw:ye,uz:ce,uz_latn:de};t.default=be,Object.defineProperty(t,"__esModule",{value:!0})}(e)},645:function(t){t.exports=function(){"use strict";function t(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}function e(e){return void 0===e&&(e={}),function(n){var i,r,o,a="",s=function(){if(e.input){if(!(i=e.input instanceof Element?e.input:window.document.querySelector(e.input)))return void n.config.errorHandler(new Error("Invalid input element specified"));n.config.wrap&&(i=i.querySelector("[data-input]"))}else(i=n._input.cloneNode()).removeAttribute("id"),i._flatpickr=void 0;if(i.value){var t=n.parseDate(i.value);t&&n.selectedDates.push(t)}i.setAttribute("data-fp-omit",""),n.config.clickOpens&&(n._bind(i,["focus","click"],(function(){n.selectedDates[1]&&(n.latestSelectedDateObj=n.selectedDates[1],n._setHoursFromDate(n.selectedDates[1]),n.jumpToDate(n.selectedDates[1])),r=!0,n.isOpen=!1,n.open(void 0,"left"===e.position?n._input:i)})),n._bind(n._input,["focus","click"],(function(t){t.preventDefault(),n.isOpen=!1,n.open()}))),n.config.allowInput&&n._bind(i,"keydown",(function(t){"Enter"===t.key&&(n.setDate([n.selectedDates[0],i.value],!0,a),i.click())})),e.input||n._input.parentNode&&n._input.parentNode.insertBefore(i,n._input.nextSibling)},l={onParseConfig:function(){n.config.mode="range",a=n.config.altInput?n.config.altFormat:n.config.dateFormat},onReady:function(){s(),n.config.ignoredFocusElements.push(i),n.config.allowInput?(n._input.removeAttribute("readonly"),i.removeAttribute("readonly")):i.setAttribute("readonly","readonly"),n._bind(n._input,"focus",(function(){n.latestSelectedDateObj=n.selectedDates[0],n._setHoursFromDate(n.selectedDates[0]),r=!1,n.jumpToDate(n.selectedDates[0])})),n.config.allowInput&&n._bind(n._input,"keydown",(function(t){"Enter"===t.key&&n.setDate([n._input.value,n.selectedDates[1]],!0,a)})),n.setDate(n.selectedDates,!1),l.onValueUpdate(n.selectedDates),n.loadedPlugins.push("range")},onPreCalendarPosition:function(){r&&(n._positionElement=i,setTimeout((function(){n._positionElement=n._input}),0))},onChange:function(){n.selectedDates.length||setTimeout((function(){n.selectedDates.length||(i.value="",o=[])}),10),r&&setTimeout((function(){i.focus()}),0)},onDestroy:function(){e.input||i.parentNode&&i.parentNode.removeChild(i)},onValueUpdate:function(e){var s,l,u;if(i){if((o=!o||e.length>=o.length?t(e):o).length>e.length){var c=e[0],h=r?[o[0],c]:[c,o[1]];h[0].getTime()>h[1].getTime()&&(r?h[0]=h[1]:h[1]=h[0]),n.setDate(h,!1),o=t(h)}l=(s=n.selectedDates.map((function(t){return n.formatDate(t,a)})))[0],n._input.value=void 0===l?"":l,u=s[1],i.value=void 0===u?"":u}}};return l}}return e}()},3583:(t,e,n)=>{"use strict";function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function r(t){var e=t.getBoundingClientRect();return{top:e.top+(document.documentElement.scrollTop||document.body.scrollTop),left:e.left+(document.documentElement.scrollLeft||document.body.scrollLeft)}}function o(t){return t.titleHeight+t.margins.top+t.paddings.top}function a(t){return t.margins.left+t.paddings.left}function s(t){return t.margins.top+t.margins.bottom+t.paddings.top+t.paddings.bottom+t.titleHeight+t.legendHeight}function l(t){return t.margins.left+t.margins.right+t.paddings.left+t.paddings.right}function u(t){return parseFloat(t.toFixed(2))}function c(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];n||(n=i?t[0]:t[t.length-1]);var r=new Array(Math.abs(e)).fill(n);return i?r.concat(t):t.concat(r)}function h(t,e){return(t+"").length*e}function d(t,e){return{x:Math.sin(t*ut)*e,y:Math.cos(t*ut)*e}}function f(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(Number.isNaN(t)||void 0===t||!Number.isFinite(t)||e&&t<0)}function p(t){var e=void 0,n=void 0,i=void 0;if(t instanceof Date)return new Date(t.getTime());if("object"!==(void 0===t?"undefined":dt(t))||null===t)return t;for(i in e=Array.isArray(t)?[]:{},t)n=t[i],e[i]=p(n);return e}function m(t,e){var n=void 0,i=void 0;return t<=e?(n=e-t,i=t):(n=t-e,i=e),[n,i]}function g(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-t.length;return n>0?t=c(t,n):e=c(e,n),[t,e]}function v(t,e){if(t)return t.length>e?t.slice(0,e-3)+"...":t}function y(t,e){for(var n=[],i=0;i<t.length;i++)n.push([t[i],e[i]]);var r=function(t,e,n,i){var r=function(t,e){var n=e[0]-t[0],i=e[1]-t[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(i,2)),angle:Math.atan2(i,n)}}(e||t,n||t),o=r.angle+(i?Math.PI:0),a=.2*r.length;return[t[0]+Math.cos(o)*a,t[1]+Math.sin(o)*a]};return function(t,e){return t.reduce((function(t,e,n,i){return 0===n?e[0]+","+e[1]:t+" "+function(t,e,n){var i=r(n[e-1],n[e-2],t),o=r(t,n[e-1],n[e+1],!0);return"C "+i[0]+","+i[1]+" "+o[0]+","+o[1]+" "+t[0]+","+t[1]}(e,n,i)}),"")}(n)}function b(t){return t>255?255:t<0?0:t}function _(t,e){var n=pt(t),i=!1;"#"==n[0]&&(n=n.slice(1),i=!0);var r=parseInt(n,16),o=b((r>>16)+e),a=b((r>>8&255)+e);return(i?"#":"")+(b((255&r)+e)|a<<8|o<<16).toString(16)}function w(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function x(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg",t);for(var i in e){var r=e[i];if("inside"===i)w(r).appendChild(n);else if("around"===i){var o=w(r);o.parentNode.insertBefore(n,o),n.appendChild(o)}else"styles"===i?"object"===(void 0===r?"undefined":gt(r))&&Object.keys(r).map((function(t){n.style[t]=r[t]})):("className"===i&&(i="class"),"innerHTML"===i?n.textContent=r:n.setAttribute(i,r))}return n}function k(t,e,n,i){return x("stop",{inside:t,style:"stop-color: "+n,offset:e,"stop-opacity":i})}function S(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n={className:t,transform:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""};return e&&(n.inside=e),x("g",n)}function C(t){return x("path",{className:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",d:t,styles:{stroke:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"none",fill:arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none","stroke-width":arguments.length>4&&void 0!==arguments[4]?arguments[4]:2}})}function T(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="path-fill-gradient-"+e+"-"+(n?"lighter":"default"),r=function(t,e){return x("linearGradient",{inside:t,id:e,x1:0,x2:0,y1:0,y2:1})}(t,i),o=[1,.6,.2];return n&&(o=[.4,.2,0]),k(r,"0%",e,o[0]),k(r,"50%",e,o[1]),k(r,"100%",e,o[2]),i}function O(t,e,n,i,r){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},a={className:t,x:e,y:n,width:i,height:i,rx:r,fill:arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none"};return Object.keys(o).map((function(t){a[t]=o[t]})),x("rect",a)}function E(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=r.fontSize||_t;return x("text",{className:t,x:e,y:n,dy:(void 0!==r.dy?r.dy:o/2)+"px","font-size":o+"px",fill:r.fill||xt,"text-anchor":r.textAnchor||"start",innerHTML:i})}function A(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};r.stroke||(r.stroke=wt),r.lineType||(r.lineType=""),r.shortenNumbers&&(e=function(t){var e=void 0;if("number"==typeof t)e=t;else if("string"==typeof t&&(e=Number(t),Number.isNaN(e)))return t;var n=Math.floor(Math.log10(Math.abs(e)));if(n<=2)return e;var i=Math.floor(n/3),r=Math.pow(10,n-3*i)*+(e/Math.pow(10,n)).toFixed(1);return Math.round(100*r)/100+" "+["","K","M","B","T"][i]}(e));var o=x("line",{className:"line-horizontal "+r.className+("dashed"===r.lineType?"dashed":""),x1:n,x2:i,y1:0,y2:0,styles:{stroke:r.stroke}}),a=x("text",{x:n<i?n-yt:n+yt,y:0,dy:_t/2-2+"px","font-size":_t+"px","text-anchor":n<i?"end":"start",innerHTML:e+""}),s=x("g",{transform:"translate(0, "+t+")","stroke-opacity":1});return 0!==a&&"0"!==a||(s.style.stroke="rgba(27, 31, 35, 0.6)"),s.appendChild(o),s.appendChild(a),s}function L(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};f(t)||(t=0),i.pos||(i.pos="bottom"),i.offset||(i.offset=0),i.mode||(i.mode="span"),i.stroke||(i.stroke=wt),i.className||(i.className="");var r=n+vt,o="span"===i.mode?-1*vt:n;return"tick"===i.mode&&"top"===i.pos&&(r=-1*vt,o=0),function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};r.stroke||(r.stroke=wt);var o=x("line",{className:"line-vertical "+r.className,x1:0,x2:0,y1:n,y2:i,styles:{stroke:r.stroke}}),a=x("text",{x:0,y:n>i?n+yt:n-yt-_t,dy:_t+"px","font-size":_t+"px","text-anchor":"middle",innerHTML:e+""}),s=x("g",{transform:"translate("+t+", 0)"});return s.appendChild(o),s.appendChild(a),s}(t,e,r,o,{stroke:i.stroke,className:i.className,lineType:i.lineType})}function M(t,e,n,i){var r="string"==typeof e?e:e.join(", ");return[t,{transform:n.join(", ")},i,Lt,"translate",{transform:r}]}function P(t,e,n){return M(t,[0,n],[0,e],Et)}function N(t,e){return[t,{d:e},Tt,Lt]}function D(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"linear",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=t.cloneNode(!0),s=t.cloneNode(!0);for(var l in e){var u=void 0;u="transform"===l?document.createElementNS("http://www.w3.org/2000/svg","animateTransform"):document.createElementNS("http://www.w3.org/2000/svg","animate");var c=o[l]||t.getAttribute(l),h=e[l],d={attributeName:l,from:c,to:h,begin:"0s",dur:n/1e3+"s",values:c+";"+h,keySplines:Pt[i],keyTimes:"0;1",calcMode:"spline",fill:"freeze"};for(var f in r&&(d.type=r),d)u.setAttribute(f,d[f]);a.appendChild(u),r?s.setAttribute(l,"translate("+h+")"):s.setAttribute(l,h)}return[a,s]}function j(t,e){t.style.transform=e,t.style.webkitTransform=e,t.style.msTransform=e,t.style.mozTransform=e,t.style.oTransform=e}function I(t,e){var n=[],i=[];e.map((function(t){var e,r,o=t[0],a=o.parentNode;t[0]=o;var s=D.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(t)),l=Mt(s,2);e=l[0],r=l[1],n.push(r),i.push([e,a]),a&&a.replaceChild(e,o)}));var r=t.cloneNode(!0);return i.map((function(t,i){t[1]&&(t[1].replaceChild(n[i],t[0]),e[i][0]=n[i])})),r}function R(t){var e=new Date(t);return e.setMinutes(e.getMinutes()-e.getTimezoneOffset()),e}function F(t){var e=t.getDate(),n=t.getMonth()+1;return[t.getFullYear(),(n>9?"":"0")+n,(e>9?"":"0")+e].join("-")}function B(t){return new Date(t.getTime())}function z(t,e){var n=U(t);return Math.ceil(function(t,e){var n=qt*zt;return(R(e)-R(t))/n}(n,e)/Bt)}function q(t,e){return t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}function H(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Ht[t];return e?n.slice(0,3):n}function W(t,e){return new Date(e,t+1,0)}function U(t){var e=B(t),n=e.getDay();return 0!==n&&V(e,-1*n),e}function V(t,e){t.setDate(t.getDate()+e)}function Z(t,e,n){var i=Object.keys(Yt).filter((function(e){return t.includes(e)})),r=Yt[i[0]];return Object.assign(r,{constants:e,getData:n}),new Zt(r)}function Y(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function $(t){if(0===t)return[0,0];if(isNaN(t))return{mantissa:-6755399441055744,exponent:972};var e=t>0?1:-1;if(!isFinite(t))return{mantissa:4503599627370496*e,exponent:972};t=Math.abs(t);var n=Math.floor(Math.log10(t));return[e*(t/Math.pow(10,n)),n]}function G(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=$(t),i=te(n,2),r=i[0],o=i[1],a=e?e/Math.pow(10,o):0,s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Math.ceil(t),i=Math.floor(e),r=n-i,o=r,a=1;r>5&&(r%2!=0&&(r=++n-i),o=r/2,a=2),r<=2&&(a=r/(o=4)),0===r&&(o=5,a=1);for(var s=[],l=0;l<=o;l++)s.push(i+a*l);return s}(r=r.toFixed(6),a);return s.map((function(t){return t*Math.pow(10,o)}))}function K(t){return t[1]-t[0]}function X(t,e){return u(e.zeroLine-t*e.scaleMultiplier)}function J(t,e){return e.filter((function(e){return e<t})).length}function Q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t/e.length;i<=0&&(i=1);var r=i/at,o=void 0;if(n){var a=Math.max.apply(Math,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(e.map((function(t){return t.length}))));o=Math.ceil(a/r)}return e.map((function(t,e){return(t+="").length>r&&(n?e%o!=0&&(t=""):t=r-3>0?t.slice(0,r-3)+" ...":t.slice(0,r)+".."),t}))}function tt(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}n.d(e,{t1:()=>de});!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}('.chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ol,.graph-svg-tip ul{padding-left:0;display:-webkit-box;display:-ms-flexbox;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:" ";border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}');var et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a)}else"styles"===r?"object"===(void 0===o?"undefined":et(o))&&Object.keys(o).map((function(t){n.style[t]=o[t]})):r in n?n[r]=o:n.setAttribute(r,o)}return n};var nt={margins:{top:10,bottom:10,left:20,right:20},paddings:{top:20,bottom:40,left:30,right:10},baseHeight:240,titleHeight:20,legendHeight:30,titleFontSize:12},it=["line","bar"],rt=2,ot=10,at=7,st=["light-blue","blue","violet","red","orange","yellow","green","light-green","purple","magenta","light-grey","dark-grey"],lt={bar:st,line:st,pie:st,percentage:st,heatmap:["#ebedf0","#c6e48b","#7bc96f","#239a3b","#196127"],donut:st},ut=Math.PI/180,ct=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),ht=function(){function t(e){var n=e.parent,i=void 0===n?null:n,r=e.colors,o=void 0===r?[]:r;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.parent=i,this.colors=o,this.titleName="",this.titleValue="",this.listValues=[],this.titleValueFirst=0,this.x=0,this.y=0,this.top=0,this.left=0,this.setup()}return ct(t,[{key:"setup",value:function(){this.makeTooltip()}},{key:"refresh",value:function(){this.fill(),this.calcPosition()}},{key:"makeTooltip",value:function(){var t=this;this.container=i.create("div",{inside:this.parent,className:"graph-svg-tip comparison",innerHTML:'<span class="title"></span>\n\t\t\t\t<ul class="data-point-list"></ul>\n\t\t\t\t<div class="svg-pointer"></div>'}),this.hideTip(),this.title=this.container.querySelector(".title"),this.dataPointList=this.container.querySelector(".data-point-list"),this.parent.addEventListener("mouseleave",(function(){t.hideTip()}))}},{key:"fill",value:function(){var t,e=this;this.index&&this.container.setAttribute("data-point-index",this.index),t=this.titleValueFirst?"<strong>"+this.titleValue+"</strong>"+this.titleName:this.titleName+"<strong>"+this.titleValue+"</strong>",this.title.innerHTML=t,this.dataPointList.innerHTML="",this.listValues.map((function(t,n){var r=e.colors[n]||"black",o=0===t.formatted||t.formatted?t.formatted:t.value,a=i.create("li",{styles:{"border-top":"3px solid "+r},innerHTML:'<strong style="display: block;">'+(0===o||o?o:"")+"</strong>\n\t\t\t\t\t"+(t.title?t.title:"")});e.dataPointList.appendChild(a)}))}},{key:"calcPosition",value:function(){var t=this.container.offsetWidth;this.top=this.y-this.container.offsetHeight-5,this.left=this.x-t/2;var e=this.parent.offsetWidth-t,n=this.container.querySelector(".svg-pointer");if(this.left<0)n.style.left="calc(50% - "+-1*this.left+"px)",this.left=0;else if(this.left>e){var i="calc(50% + "+(this.left-e)+"px)";n.style.left=i,this.left=e}else n.style.left="50%"}},{key:"setValues",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;this.titleName=n.name,this.titleValue=n.value,this.listValues=i,this.x=t,this.y=e,this.titleValueFirst=n.valueFirst||0,this.index=r,this.refresh()}},{key:"hideTip",value:function(){this.container.style.top="0px",this.container.style.left="0px",this.container.style.opacity="0"}},{key:"showTip",value:function(){this.container.style.top=this.top+"px",this.container.style.left=this.left+"px",this.container.style.opacity="1"}}]),t}(),dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft={"light-blue":"#7cd6fd",blue:"#5e64ff",violet:"#743ee2",red:"#ff5858",orange:"#ffa00a",yellow:"#feef72",green:"#28a745","light-green":"#98d85b",purple:"#b554ff",magenta:"#ffa3ef",black:"#36114C",grey:"#bdd3e6","light-grey":"#f0f4f7","dark-grey":"#b8c2cc"},pt=function(t){return/rgb[a]{0,1}\([\d, ]+\)/gim.test(t)?/\D+(\d*)\D+(\d*)\D+(\d*)/gim.exec(t).map((function(t,e){return 0!==e?Number(t).toString(16):"#"})).reduce((function(t,e){return""+t+e})):ft[t]||t},mt=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt=6,yt=4,bt=15,_t=10,wt="#dadada",xt="#555b51",kt={bar:function(t){var e=void 0;"rect"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var n=t.cloneNode();return n.style.fill="#000000",n.style.opacity="0.4",e&&n.setAttribute("transform",e),n},dot:function(t){var e=void 0;"circle"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var n=t.cloneNode(),i=t.getAttribute("r"),r=t.getAttribute("fill");return n.setAttribute("r",parseInt(i)+4),n.setAttribute("fill",r),n.style.opacity="0.6",e&&n.setAttribute("transform",e),n},heat_square:function(t){var e=void 0;"circle"!==t.nodeName&&(e=t.getAttribute("transform"),t=t.childNodes[0]);var n=t.cloneNode(),i=t.getAttribute("r"),r=t.getAttribute("fill");return n.setAttribute("r",parseInt(i)+4),n.setAttribute("fill",r),n.style.opacity="0.6",e&&n.setAttribute("transform",e),n}},St={bar:function(t,e){var n=void 0;"rect"!==t.nodeName&&(n=t.getAttribute("transform"),t=t.childNodes[0]);var i=["x","y","width","height"];Object.values(t.attributes).filter((function(t){return i.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),n&&e.setAttribute("transform",n)},dot:function(t,e){var n=void 0;"circle"!==t.nodeName&&(n=t.getAttribute("transform"),t=t.childNodes[0]);var i=["cx","cy"];Object.values(t.attributes).filter((function(t){return i.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),n&&e.setAttribute("transform",n)},heat_square:function(t,e){var n=void 0;"circle"!==t.nodeName&&(n=t.getAttribute("transform"),t=t.childNodes[0]);var i=["cx","cy"];Object.values(t.attributes).filter((function(t){return i.includes(t.name)&&t.specified})).map((function(t){e.setAttribute(t.name,t.nodeValue)})),n&&e.setAttribute("transform",n)}},Ct=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Tt=350,Ot=350,Et=Tt,At=250,Lt="easein",Mt=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Pt={ease:"0.25 0.1 0.25 1",linear:"0 0 1 1",easein:"0.1 0.8 0.2 1",easeout:"0 0 0.58 1",easeinout:"0.42 0 0.58 1"},Nt=".chart-container{position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Roboto','Oxygen','Ubuntu','Cantarell','Fira Sans','Droid Sans','Helvetica Neue',sans-serif}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.8);border-radius:3px}.graph-svg-tip ul{padding-left:0;display:flex}.graph-svg-tip ol{padding-left:0;display:flex}.graph-svg-tip ul.data-point-list li{min-width:90px;flex:1;font-weight:600}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{position:absolute;height:5px;margin:0 0 0 -5px;content:' ';border:5px solid transparent;border-top-color:rgba(0,0,0,.8)}.graph-svg-tip.comparison{padding:0;text-align:left;pointer-events:none}.graph-svg-tip.comparison .title{display:block;padding:10px;margin:0;font-weight:600;line-height:1;pointer-events:none}.graph-svg-tip.comparison ul{margin:0;white-space:nowrap;list-style:none}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}",Dt=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),jt=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=p(n),this.parent="string"==typeof e?document.querySelector(e):e,!(this.parent instanceof HTMLElement))throw new Error("No `parent` element to render on was provided.");this.rawChartArgs=n,this.title=n.title||"",this.type=n.type||"",this.realData=this.prepareData(n.data),this.data=this.prepareFirstData(this.realData),this.colors=this.validateColors(n.colors,this.type),this.config={showTooltip:1,showLegend:1,isNavigable:n.isNavigable||0,animate:void 0!==n.animate?n.animate:1,truncateLegends:n.truncateLegends||1},this.measures=JSON.parse(JSON.stringify(nt));var i=this.measures;this.setMeasures(n),this.title.length||(i.titleHeight=0),this.config.showLegend||(i.legendHeight=0),this.argHeight=n.height||i.baseHeight,this.state={},this.options={},this.initTimeout=700,this.config.isNavigable&&(this.overlays=[]),this.configure(n)}return Dt(t,[{key:"prepareData",value:function(t){return t}},{key:"prepareFirstData",value:function(t){return t}},{key:"validateColors",value:function(t,e){var n=[];return(t=(t||[]).concat(lt[e])).forEach((function(t){var e=pt(t);!function(t){return/(^\s*)(#)((?:[A-Fa-f0-9]{3}){1,2})$/i.test(t)||/(^\s*)(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/i.test(t)}(e)||n.push(e)})),n}},{key:"setMeasures",value:function(){}},{key:"configure",value:function(){var t=this,e=this.argHeight;this.baseHeight=e,this.height=e-s(this.measures),this.boundDrawFn=function(){return t.draw(!0)},ResizeObserver&&(this.resizeObserver=new ResizeObserver(this.boundDrawFn),this.resizeObserver.observe(this.parent)),window.addEventListener("resize",this.boundDrawFn),window.addEventListener("orientationchange",this.boundDrawFn)}},{key:"destroy",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),window.removeEventListener("resize",this.boundDrawFn),window.removeEventListener("orientationchange",this.boundDrawFn)}},{key:"setup",value:function(){this.makeContainer(),this.updateWidth(),this.makeTooltip(),this.draw(!1,!0)}},{key:"makeContainer",value:function(){this.parent.innerHTML="";var t={inside:this.parent,className:"chart-container"};this.independentWidth&&(t.styles={width:this.independentWidth+"px"}),this.container=i.create("div",t)}},{key:"makeTooltip",value:function(){this.tip=new ht({parent:this.container,colors:this.colors}),this.bindTooltip()}},{key:"bindTooltip",value:function(){}},{key:"draw",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&function(t){return null===t.offsetParent}(this.parent)||(this.updateWidth(),this.calc(e),this.makeChartArea(),this.setupComponents(),this.components.forEach((function(e){return e.setup(t.drawArea)})),this.render(this.components,!1),n&&(this.data=this.realData,setTimeout((function(){t.update(t.data)}),this.initTimeout)),this.renderLegend(),this.setupNavigation(n))}},{key:"calc",value:function(){}},{key:"updateWidth",value:function(){this.baseWidth=function(t){var e=window.getComputedStyle(t),n=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight);return t.clientWidth-n}(this.parent),this.width=this.baseWidth-l(this.measures)}},{key:"makeChartArea",value:function(){this.svg&&this.container.removeChild(this.svg);var t=this.measures;this.svg=function(t,e,n,i){return x("svg",{className:e,inside:t,width:n,height:i})}(this.container,"frappe-chart chart",this.baseWidth,this.baseHeight),this.svgDefs=function(t){return x("defs",{inside:t})}(this.svg),this.title.length&&(this.titleEL=E("title",t.margins.left,t.margins.top,this.title,{fontSize:t.titleFontSize,fill:"#666666",dy:t.titleFontSize}));var e=o(t);this.drawArea=S(this.type+"-chart chart-draw-area","translate("+a(t)+", "+e+")"),this.config.showLegend&&(e+=this.height+t.paddings.bottom,this.legendArea=S("chart-legend","translate("+a(t)+", "+e+")")),this.title.length&&this.svg.appendChild(this.titleEL),this.svg.appendChild(this.drawArea),this.config.showLegend&&this.svg.appendChild(this.legendArea),this.updateTipOffset(a(t),o(t))}},{key:"updateTipOffset",value:function(t,e){this.tip.offset={x:t,y:e}}},{key:"setupComponents",value:function(){this.components=new Map}},{key:"update",value:function(t){this.data=this.prepareData(t),this.calc(),this.render(this.components,this.config.animate),this.renderLegend()}},{key:"render",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.components,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.config.isNavigable&&this.overlays.map((function(t){return t.parentNode.removeChild(t)}));var i=[];e.forEach((function(t){i=i.concat(t.update(n))})),i.length>0?(function(t,e,n){if(0!==n.length){var i=I(e,n);e.parentNode==t&&(t.removeChild(e),t.appendChild(i)),setTimeout((function(){i.parentNode==t&&(t.removeChild(i),t.appendChild(e))}),At)}}(this.container,this.svg,i),setTimeout((function(){e.forEach((function(t){return t.make()})),t.updateNav()}),400)):(e.forEach((function(t){return t.make()})),this.updateNav())}},{key:"updateNav",value:function(){this.config.isNavigable&&(this.makeOverlay(),this.bindUnits())}},{key:"renderLegend",value:function(){}},{key:"setupNavigation",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.config.isNavigable&&e&&(this.bindOverlay(),this.keyActions={13:this.onEnterKey.bind(this),37:this.onLeftArrow.bind(this),38:this.onUpArrow.bind(this),39:this.onRightArrow.bind(this),40:this.onDownArrow.bind(this)},document.addEventListener("keydown",(function(e){(function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)})(t.container)&&(e=e||window.event,t.keyActions[e.keyCode]&&t.keyActions[e.keyCode]())})))}},{key:"makeOverlay",value:function(){}},{key:"updateOverlay",value:function(){}},{key:"bindOverlay",value:function(){}},{key:"bindUnits",value:function(){}},{key:"onLeftArrow",value:function(){}},{key:"onRightArrow",value:function(){}},{key:"onUpArrow",value:function(){}},{key:"onDownArrow",value:function(){}},{key:"onEnterKey",value:function(){}},{key:"addDataPoint",value:function(){}},{key:"removeDataPoint",value:function(){}},{key:"getDataPoint",value:function(){}},{key:"setCurrentDataPoint",value:function(){}},{key:"updateDataset",value:function(){}},{key:"export",value:function(){var t=function(t){var e=t.cloneNode(!0);e.classList.add("chart-container"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");var n=i.create("style",{innerHTML:Nt});e.insertBefore(n,e.firstChild);var r=i.create("div");return r.appendChild(e),r.innerHTML}(this.svg);!function(t,e){var n=document.createElement("a");n.style="display: none";var i=new Blob(e,{type:"image/svg+xml; charset=utf-8"}),r=window.URL.createObjectURL(i);n.href=r,n.download=t,document.body.appendChild(n),n.click(),setTimeout((function(){document.body.removeChild(n),window.URL.revokeObjectURL(r)}),300)}(this.title||"Chart",[t])}}]),t}(),It=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Rt=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},Ft=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),It(e,[{key:"configure",value:function(t){Rt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"configure",this).call(this,t),this.config.formatTooltipY=(t.tooltipOptions||{}).formatTooltipY,this.config.maxSlices=t.maxSlices||20,this.config.maxLegendPoints=t.maxLegendPoints||20}},{key:"calc",value:function(){var t=this,e=this.state,n=this.config.maxSlices;e.sliceTotals=[];var i=this.data.labels.map((function(e,n){var i=0;return t.data.datasets.map((function(t){i+=t.values[n]})),[i,e]})).filter((function(t){return t[0]>=0})),r=i;if(i.length>n){i.sort((function(t,e){return e[0]-t[0]})),r=i.slice(0,n-1);var o=0;i.slice(n-1).map((function(t){o+=t[0]})),r.push([o,"Rest"]),this.colors[n-1]="grey"}e.labels=[],r.map((function(t){e.sliceTotals.push(function(t){return Number(Math.round(t+"e4")+"e-4")}(t[0])),e.labels.push(t[1])})),e.grandTotal=e.sliceTotals.reduce((function(t,e){return t+e}),0),this.center={x:this.width/2,y:this.height/2}}},{key:"renderLegend",value:function(){var t=this,e=this.state;this.legendArea.textContent="",this.legendTotals=e.sliceTotals.slice(0,this.config.maxLegendPoints);var n=0,i=0;this.legendTotals.map((function(r,o){var a=150,s=Math.floor((t.width-l(t.measures))/a);t.legendTotals.length<s&&(a=t.width/t.legendTotals.length),n>s&&(n=0,i+=20);var u=a*n+5,c=t.config.truncateLegends?v(e.labels[o],a/10):e.labels[o],h=t.config.formatTooltipY?t.config.formatTooltipY(r):r,d=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",r=arguments[4];r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?v(r,bt):r;var o={className:"legend-dot",cx:0,cy:0,r:n,fill:i},a=x("text",{className:"legend-dataset-text",x:0,y:0,dx:_t+"px",dy:_t/3+"px","font-size":1.2*_t+"px","text-anchor":"start",fill:xt,innerHTML:r}),s=x("g",{transform:"translate("+t+", "+e+")"});return s.appendChild(x("circle",o)),s.appendChild(a),s}(u,i,5,t.colors[o],c+": "+h,!1);t.legendArea.appendChild(d),n++}))}}]),e}(jt),Bt=7,zt=1e3,qt=86400,Ht=["January","February","March","April","May","June","July","August","September","October","November","December"],Wt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ut=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Vt=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Zt=function(){function t(e){var n=e.layerClass,i=void 0===n?"":n,r=e.layerTransform,o=void 0===r?"":r,a=e.constants,s=e.getData,l=e.makeElements,u=e.animateElements;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.layerTransform=o,this.constants=a,this.makeElements=l,this.getData=s,this.animateElements=u,this.store=[],this.labels=[],this.layerClass=i,this.layerClass="function"==typeof this.layerClass?this.layerClass():this.layerClass,this.refresh()}return Vt(t,[{key:"refresh",value:function(t){this.data=t||this.getData()}},{key:"setup",value:function(t){this.layer=S(this.layerClass,this.layerTransform,t)}},{key:"make",value:function(){this.render(this.data),this.oldData=this.data}},{key:"render",value:function(t){var e=this;this.store=this.makeElements(t),this.layer.textContent="",this.store.forEach((function(t){e.layer.appendChild(t)})),this.labels.forEach((function(t){e.layer.appendChild(t)}))}},{key:"update",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.refresh();var e=[];return t&&(e=this.animateElements(this.data)||[]),e}}]),t}(),Yt={donutSlices:{layerClass:"donut-slices",makeElements:function(t){return t.sliceStrings.map((function(e,n){var i=C(e,"donut-path",t.colors[n],"none",t.strokeWidth);return i.style.transition="transform .3s;",i}))},animateElements:function(t){return this.store.map((function(e,n){return N(e,t.sliceStrings[n])}))}},pieSlices:{layerClass:"pie-slices",makeElements:function(t){return t.sliceStrings.map((function(e,n){var i=C(e,"pie-path","none",t.colors[n]);return i.style.transition="transform .3s;",i}))},animateElements:function(t){return this.store.map((function(e,n){return N(e,t.sliceStrings[n])}))}},percentageBars:{layerClass:"percentage-bars",makeElements:function(t){var e=this;return t.xPositions.map((function(n,i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:rt,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"none";return x("rect",{className:"percentage-bar",x:t,y:e,width:n,height:i,fill:o,styles:{stroke:_(o,-25),"stroke-dasharray":"0, "+(i+n)+", "+n+", "+i,"stroke-width":r}})}(n,0,t.widths[i],e.constants.barHeight,e.constants.barDepth,t.colors[i])}))},animateElements:function(t){if(t)return[]}},yAxis:{layerClass:"y axis",makeElements:function(t){var e=this;return t.positions.map((function(n,i){return function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};f(t)||(t=0),i.pos||(i.pos="left"),i.offset||(i.offset=0),i.mode||(i.mode="span"),i.stroke||(i.stroke=wt),i.className||(i.className="");var r=-1*vt,o="span"===i.mode?n+vt:0;return"tick"===i.mode&&"right"===i.pos&&(r=n+vt,o=n),A(t,e,r+=i.offset,o+=i.offset,{stroke:i.stroke,className:i.className,lineType:i.lineType,shortenNumbers:i.shortenNumbers})}(n,t.labels[i],e.constants.width,{mode:e.constants.mode,pos:e.constants.pos,shortenNumbers:e.constants.shortenNumbers})}))},animateElements:function(t){var e=t.positions,n=t.labels,i=this.oldData.positions,r=this.oldData.labels,o=g(i,e),a=Ut(o,2);i=a[0],e=a[1];var s=g(r,n),l=Ut(s,2);return r=l[0],n=l[1],this.render({positions:i,labels:n}),this.store.map((function(t,n){return P(t,e[n],i[n])}))}},xAxis:{layerClass:"x axis",makeElements:function(t){var e=this;return t.positions.map((function(n,i){return L(n,t.calcLabels[i],e.constants.height,{mode:e.constants.mode,pos:e.constants.pos})}))},animateElements:function(t){var e=t.positions,n=t.calcLabels,i=this.oldData.positions,r=this.oldData.calcLabels,o=g(i,e),a=Ut(o,2);i=a[0],e=a[1];var s=g(r,n),l=Ut(s,2);return r=l[0],n=l[1],this.render({positions:i,calcLabels:n}),this.store.map((function(t,n){return function(t,e,n){return M(t,[n,0],[e,0],Et)}(t,e[n],i[n])}))}},yMarkers:{layerClass:"y-markers",makeElements:function(t){var e=this;return t.map((function(t){return function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};i.labelPos||(i.labelPos="right");var r=x("text",{className:"chart-label",x:"left"===i.labelPos?yt:n-h(e,5)-yt,y:0,dy:_t/-2+"px","font-size":_t+"px","text-anchor":"start",innerHTML:e+""}),o=A(t,"",0,n,{stroke:i.stroke||wt,className:i.className||"",lineType:i.lineType});return o.appendChild(r),o}(t.position,t.label,e.constants.width,{labelPos:t.options.labelPos,mode:"span",lineType:"dashed"})}))},animateElements:function(t){var e=g(this.oldData,t),n=Ut(e,2);this.oldData=n[0];var i=(t=n[1]).map((function(t){return t.position})),r=t.map((function(t){return t.label})),o=t.map((function(t){return t.options})),a=this.oldData.map((function(t){return t.position}));return this.render(a.map((function(t,e){return{position:a[e],label:r[e],options:o[e]}}))),this.store.map((function(t,e){return P(t,i[e],a[e])}))}},yRegions:{layerClass:"y-regions",makeElements:function(t){var e=this;return t.map((function(t){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t-e,a=x("rect",{className:"bar mini",styles:{fill:"rgba(228, 234, 239, 0.49)",stroke:wt,"stroke-dasharray":n+", "+o},x:0,y:0,width:n,height:o});r.labelPos||(r.labelPos="right");var s=x("text",{className:"chart-label",x:"left"===r.labelPos?yt:n-h(i+"",4.5)-yt,y:0,dy:_t/-2+"px","font-size":_t+"px","text-anchor":"start",innerHTML:i+""}),l=x("g",{transform:"translate(0, "+e+")"});return l.appendChild(a),l.appendChild(s),l}(t.startPos,t.endPos,e.constants.width,t.label,{labelPos:t.options.labelPos})}))},animateElements:function(t){var e=g(this.oldData,t),n=Ut(e,2);this.oldData=n[0];var i=(t=n[1]).map((function(t){return t.endPos})),r=t.map((function(t){return t.label})),o=t.map((function(t){return t.startPos})),a=t.map((function(t){return t.options})),s=this.oldData.map((function(t){return t.endPos})),l=this.oldData.map((function(t){return t.startPos}));this.render(s.map((function(t,e){return{startPos:l[e],endPos:s[e],label:r[e],options:a[e]}})));var u=[];return this.store.map((function(t,e){u=u.concat(function(t,e,n,i){var r=e-n,o=t.childNodes[0];return[[o,{height:r,"stroke-dasharray":o.getAttribute("width")+", "+r},Et,Lt],M(t,[0,i],[0,n],Et)]}(t,o[e],i[e],s[e]))})),u}},heatDomain:{layerClass:function(){return"heat-domain domain-"+this.constants.index},makeElements:function(t){var e=this,n=this.constants,i=n.index,r=n.colWidth,o=n.rowHeight,a=n.squareSize,s=n.radius,l=n.xTranslate,u=0;return this.serializedSubDomains=[],t.cols.map((function(t,n){1===n&&e.labels.push(E("domain-name",l,-12,H(i,!0).toUpperCase(),{fontSize:9})),t.map((function(t,n){if(t.fill){var i={"data-date":t.yyyyMmDd,"data-value":t.dataValue,"data-day":n},r=O("day",l,u,a,s,t.fill,i);e.serializedSubDomains.push(r)}u+=o})),u=0,l+=r})),this.serializedSubDomains},animateElements:function(t){if(t)return[]}},barGraph:{layerClass:function(){return"dataset-units dataset-bars dataset-"+this.constants.index},makeElements:function(t){var e=this.constants;return this.unitType="bar",this.units=t.yPositions.map((function(n,i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=m(e,s.zeroLine),u=mt(l,2),c=u[0],h=u[1];h-=a,0===c&&(c=s.minHeight,h-=s.minHeight),f(t)||(t=0),f(h)||(h=0),f(c,!0)||(c=0),f(n,!0)||(n=0);var d=x("rect",{className:"bar mini",style:"fill: "+i,"data-point-index":o,x:t,y:h,width:n,height:c});if((r+="")||r.length){d.setAttribute("y",0),d.setAttribute("x",0);var p=x("text",{className:"data-point-value",x:n/2,y:0,dy:_t/2*-1+"px","font-size":_t+"px","text-anchor":"middle",innerHTML:r}),g=x("g",{"data-point-index":o,transform:"translate("+t+", "+h+")"});return g.appendChild(d),g.appendChild(p),g}return d}(t.xPositions[i],n,t.barWidth,e.color,t.labels[i],i,t.offsets[i],{zeroLine:t.zeroLine,barsWidth:t.barsWidth,minHeight:e.minHeight})})),this.units},animateElements:function(t){var e=t.xPositions,n=t.yPositions,i=t.offsets,r=t.labels,o=this.oldData.xPositions,a=this.oldData.yPositions,s=this.oldData.offsets,l=this.oldData.labels,u=g(o,e),c=Ut(u,2);o=c[0],e=c[1];var h=g(a,n),d=Ut(h,2);a=d[0],n=d[1];var f=g(s,i),p=Ut(f,2);s=p[0],i=p[1];var v=g(l,r),y=Ut(v,2);l=y[0],r=y[1],this.render({xPositions:o,yPositions:a,offsets:s,labels:r,zeroLine:this.oldData.zeroLine,barsWidth:this.oldData.barsWidth,barWidth:this.oldData.barWidth});var b=[];return this.store.map((function(r,o){b=b.concat(function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=m(n,(arguments.length>5&&void 0!==arguments[5]?arguments[5]:{}).zeroLine),a=Ct(o,2),s=a[0],l=a[1];return l-=r,"rect"!==t.nodeName?[[t.childNodes[0],{width:i,height:s},Tt,Lt],M(t,t.getAttribute("transform").split("(")[1].slice(0,-1),[e,l],Et)]:[[t,{width:i,height:s,x:e,y:l},Tt,Lt]]}(r,e[o],n[o],t.barWidth,i[o],{zeroLine:t.zeroLine}))})),b}},lineGraph:{layerClass:function(){return"dataset-units dataset-line dataset-"+this.constants.index},makeElements:function(t){var e=this.constants;return this.unitType="dot",this.paths={},e.hideLine||(this.paths=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=e.map((function(e,n){return t[n]+","+e})).join("L");i.spline&&(o=y(t,e));var a=C("M"+o,"line-graph-path",n);if(i.heatline){var s=T(r.svgDefs,n);a.style.stroke="url(#"+s+")"}var l={path:a};if(i.regionFill){var u=T(r.svgDefs,n,!0),c="M"+t[0]+","+r.zeroLine+"L"+o+"L"+t.slice(-1)[0]+","+r.zeroLine;l.region=C(c,"region-fill","none","url(#"+u+")")}return l}(t.xPositions,t.yPositions,e.color,{heatline:e.heatline,regionFill:e.regionFill,spline:e.spline},{svgDefs:e.svgDefs,zeroLine:t.zeroLine})),this.units=[],e.hideDots||(this.units=t.yPositions.map((function(n,i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=x("circle",{style:"fill: "+i,"data-point-index":o,cx:t,cy:e,r:n});if((r+="")||r.length){a.setAttribute("cy",0),a.setAttribute("cx",0);var s=x("text",{className:"data-point-value",x:0,y:0,dy:_t/2*-1-n+"px","font-size":_t+"px","text-anchor":"middle",innerHTML:r}),l=x("g",{"data-point-index":o,transform:"translate("+t+", "+e+")"});return l.appendChild(a),l.appendChild(s),l}return a}(t.xPositions[i],n,t.radius,e.color,e.valuesOverPoints?t.values[i]:"",i)}))),Object.values(this.paths).concat(this.units)},animateElements:function(t){var e=t.xPositions,n=t.yPositions,i=t.values,r=this.oldData.xPositions,o=this.oldData.yPositions,a=this.oldData.values,s=g(r,e),l=Ut(s,2);r=l[0],e=l[1];var u=g(o,n),c=Ut(u,2);o=c[0],n=c[1];var h=g(a,i),d=Ut(h,2);a=d[0],i=d[1],this.render({xPositions:r,yPositions:o,values:i,zeroLine:this.oldData.zeroLine,radius:this.oldData.radius});var f=[];return Object.keys(this.paths).length&&(f=f.concat(function(t,e,n,i,r){var o=[],a=n.map((function(t,n){return e[n]+","+t})).join("L");r&&(a=y(e,n));var s=[t.path,{d:"M"+a},Ot,Lt];if(o.push(s),t.region){var l=e[0]+","+i+"L",u="L"+e.slice(-1)[0]+", "+i,c=[t.region,{d:"M"+l+a+u},Ot,Lt];o.push(c)}return o}(this.paths,e,n,t.zeroLine,this.constants.spline))),this.units.length&&this.units.map((function(t,i){f=f.concat(function(t,e,n){return"circle"!==t.nodeName?[M(t,t.getAttribute("transform").split("(")[1].slice(0,-1),[e,n],Et)]:[[t,{cx:e,cy:n},Tt,Lt]]}(t,e[i],n[i]))})),f}}},$t=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Gt=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},Kt=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.type="percentage",i.setup(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),$t(e,[{key:"setMeasures",value:function(t){var e=this.measures;this.barOptions=t.barOptions||{};var n=this.barOptions;n.height=n.height||20,n.depth=n.depth||rt,e.paddings.right=30,e.legendHeight=60,e.baseHeight=8*(n.height+.5*n.depth)}},{key:"setupComponents",value:function(){var t=this.state,e=[["percentageBars",{barHeight:this.barOptions.height,barDepth:this.barOptions.depth},function(){return{xPositions:t.xPositions,widths:t.widths,colors:this.colors}}.bind(this)]];this.components=new Map(e.map((function(t){var e=Z.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(t));return[t[0],e]})))}},{key:"calc",value:function(){var t=this;Gt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"calc",this).call(this);var n=this.state;n.xPositions=[],n.widths=[];var i=0;n.sliceTotals.map((function(e){var r=t.width*e/n.grandTotal;n.widths.push(r),n.xPositions.push(i),i+=r}))}},{key:"makeDataByIndex",value:function(){}},{key:"bindTooltip",value:function(){var t=this,e=this.state;this.container.addEventListener("mousemove",(function(n){var i=t.components.get("percentageBars").store,o=n.target;if(i.includes(o)){var a=i.indexOf(o),s=r(t.container),l=r(o),u=l.left-s.left+parseInt(o.getAttribute("width"))/2,c=l.top-s.top,h=(t.formattedLabels&&t.formattedLabels.length>0?t.formattedLabels[a]:t.state.labels[a])+": ",d=e.sliceTotals[a]/e.grandTotal;t.tip.setValues(u,c,{name:h,value:(100*d).toFixed(1)+"%"}),t.tip.showTip()}}))}}]),e}(Ft),Xt=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Jt=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},Qt=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.type="pie",i.initTimeout=0,i.init=1,i.setup(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),Xt(e,[{key:"configure",value:function(t){Jt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"configure",this).call(this,t),this.mouseMove=this.mouseMove.bind(this),this.mouseLeave=this.mouseLeave.bind(this),this.hoverRadio=t.hoverRadio||.1,this.config.startAngle=t.startAngle||0,this.clockWise=t.clockWise||!1}},{key:"calc",value:function(){var t=this;Jt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"calc",this).call(this);var n=this.state;this.radius=this.height>this.width?this.center.x:this.center.y;var i=this.radius,r=this.clockWise,o=n.slicesProperties||[];n.sliceStrings=[],n.slicesProperties=[];var a=180-this.config.startAngle;n.sliceTotals.map((function(e,s){var l=a,u=e/n.grandTotal*360,c=u>180?1:0,h=r?-u:u,f=a+=h,p=d(l,i),m=d(f,i),g=t.init&&o[s],v=void 0,y=void 0;t.init?(v=g?g.startPosition:p,y=g?g.endPosition:p):(v=p,y=m);var b=360===u?function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=n.x+t.x,s=n.y+t.y,l=n.x+e.x,u=2*n.y,c=n.y+e.y;return"M"+n.x+" "+n.y+"\n\t\tL"+a+" "+s+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+u+" z\n\t\tL"+a+" "+u+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+c+" z"}(v,y,t.center,t.radius,r,c):function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=n.x+t.x,s=n.y+t.y,l=n.x+e.x,u=n.y+e.y;return"M"+n.x+" "+n.y+"\n\t\tL"+a+" "+s+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+u+" z"}(v,y,t.center,t.radius,r,c);n.sliceStrings.push(b),n.slicesProperties.push({startPosition:p,endPosition:m,value:e,total:n.grandTotal,startAngle:l,endAngle:f,angle:h})})),this.init=0}},{key:"setupComponents",value:function(){var t=this.state,e=[["pieSlices",{},function(){return{sliceStrings:t.sliceStrings,colors:this.colors}}.bind(this)]];this.components=new Map(e.map((function(t){var e=Z.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(t));return[t[0],e]})))}},{key:"calTranslateByAngle",value:function(t){var e=this.radius,n=this.hoverRadio,i=d(t.startAngle+t.angle/2,e);return"translate3d("+i.x*n+"px,"+i.y*n+"px,0)"}},{key:"hoverSlice",value:function(t,e,n,i){if(t){var o=this.colors[e];if(n){j(t,this.calTranslateByAngle(this.state.slicesProperties[e])),t.style.fill=_(o,50);var a=r(this.svg),s=i.pageX-a.left+10,l=i.pageY-a.top-10,u=(this.formatted_labels&&this.formatted_labels.length>0?this.formatted_labels[e]:this.state.labels[e])+": ",c=(100*this.state.sliceTotals[e]/this.state.grandTotal).toFixed(1);this.tip.setValues(s,l,{name:u,value:c+"%"}),this.tip.showTip()}else j(t,"translate3d(0,0,0)"),this.tip.hideTip(),t.style.fill=o}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(t){var e=t.target,n=this.components.get("pieSlices").store,i=this.curActiveSliceIndex,r=this.curActiveSlice;if(n.includes(e)){var o=n.indexOf(e);this.hoverSlice(r,i,!1),this.curActiveSlice=e,this.curActiveSliceIndex=o,this.hoverSlice(e,o,!0,t)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),e}(Ft),te=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},ee=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),ne=12,ie=ne,re=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));i.type="heatmap",i.countLabel=n.countLabel||"";var r=["Sunday","Monday"],o=r.includes(n.startSubDomain)?n.startSubDomain:"Sunday";return i.startSubDomainIndex=r.indexOf(o),i.setup(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),ee(e,[{key:"setMeasures",value:function(t){var e=this.measures;this.discreteDomains=0===t.discreteDomains?0:1,e.paddings.top=36,e.paddings.bottom=0,e.legendHeight=24,e.baseHeight=ie*Bt+s(e);var n=this.data,i=this.discreteDomains?12:0;this.independentWidth=(z(n.start,n.end)+i)*ne+l(e)}},{key:"updateWidth",value:function(){var t=this.discreteDomains?12:0,e=this.state.noOfWeeks?this.state.noOfWeeks:52;this.baseWidth=(e+t)*ne+l(this.measures)}},{key:"prepareData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data;if(t.start&&t.end&&t.start>t.end)throw new Error("Start date cannot be greater than end date.");if(t.start||(t.start=new Date,t.start.setFullYear(t.start.getFullYear()-1)),t.end||(t.end=new Date),t.dataPoints=t.dataPoints||{},parseInt(Object.keys(t.dataPoints)[0])>1e5){var e={};Object.keys(t.dataPoints).forEach((function(n){var i=new Date(n*zt);e[F(i)]=t.dataPoints[n]})),t.dataPoints=e}return t}},{key:"calc",value:function(){var t=this.state;t.start=B(this.data.start),t.end=B(this.data.end),t.firstWeekStart=B(t.start),t.noOfWeeks=z(t.start,t.end),t.distribution=function(t,e){for(var n=Math.max.apply(Math,Y(t)),i=1/(e-1),r=[],o=0;o<e;o++){var a=n*(i*o);r.push(a)}return r}(Object.values(this.data.dataPoints),5),t.domainConfigs=this.getDomains()}},{key:"setupComponents",value:function(){var t=this,e=this.state,n=this.discreteDomains?0:1,i=e.domainConfigs.map((function(i,r){return["heatDomain",{index:i.index,colWidth:ne,rowHeight:ie,squareSize:ot,radius:t.rawChartArgs.radius||0,xTranslate:e.domainConfigs.filter((function(t,e){return e<r})).map((function(t){return t.cols.length-n})).reduce((function(t,e){return t+e}),0)*ne},function(){return e.domainConfigs[r]}.bind(t)]}));this.components=new Map(i.map((function(t,e){var n=Z.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(t));return[t[0]+"-"+e,n]})));var r=0;Wt.forEach((function(e,n){if([1,3,5].includes(n)){var i=E("subdomain-name",-6,r,e,{fontSize:ot,dy:8,textAnchor:"end"});t.drawArea.appendChild(i)}r+=ie}))}},{key:"update",value:function(t){this.data=this.prepareData(t),this.draw(),this.bindTooltip()}},{key:"bindTooltip",value:function(){var t=this;this.container.addEventListener("mousemove",(function(e){t.components.forEach((function(n){var i=n.store,r=e.target;if(i.includes(r)){var o=r.getAttribute("data-value"),a=r.getAttribute("data-date").split("-"),s=H(parseInt(a[1])-1,!0),l=t.container.getBoundingClientRect(),u=r.getBoundingClientRect(),c=parseInt(e.target.getAttribute("width")),h=u.left-l.left+c/2,d=u.top-l.top,f=o+" "+t.countLabel,p=" on "+s+" "+a[0]+", "+a[2];t.tip.setValues(h,d,{name:p,value:f,valueFirst:1},[]),t.tip.showTip()}}))}))}},{key:"renderLegend",value:function(){var t=this;this.legendArea.textContent="";var e=0,n=this.rawChartArgs.radius||0,i=E("subdomain-name",e,12,"Less",{fontSize:11,dy:9});e=30,this.legendArea.appendChild(i),this.colors.slice(0,5).map((function(i,r){var o=O("heatmap-legend-unit",e+15*r,12,ot,n,i);t.legendArea.appendChild(o)}));var r=E("subdomain-name",e+75+3,12,"More",{fontSize:11,dy:9});this.legendArea.appendChild(r)}},{key:"getDomains",value:function(){for(var t=this.state,e=[t.start.getMonth(),t.start.getFullYear()],n=e[0],i=e[1],r=[t.end.getMonth(),t.end.getFullYear()],o=r[0]-n+1+12*(r[1]-i),a=[],s=B(t.start),l=0;l<o;l++){var u=t.end;if(!q(s,t.end)){var c=[s.getMonth(),s.getFullYear()];u=W(c[0],c[1])}a.push(this.getDomainConfig(s,u)),V(u,1),s=u}return a}},{key:"getDomainConfig",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[t.getMonth(),t.getFullYear()],i=n[0],r=n[1],o=U(t),a={index:i,cols:[]};V(e=B(e)||W(i,r),1);for(var s=z(o,e),l=[],u=void 0,c=0;c<s;c++)u=this.getCol(o,i),l.push(u),V(o=new Date(u[Bt-1].yyyyMmDd),1);return void 0!==u[Bt-1].dataValue&&(V(o,1),l.push(this.getCol(o,i,!0))),a.cols=l,a}},{key:"getCol",value:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.state,r=B(t),o=[],a=0;a<Bt;a++,V(r,1)){var s={},l=r>=i.start&&r<=i.end;n||r.getMonth()!==e||!l?s.yyyyMmDd=F(r):s=this.getSubDomainConfig(r),o.push(s)}return o}},{key:"getSubDomainConfig",value:function(t){var e=F(t),n=this.data.dataPoints[e];return{yyyyMmDd:e,dataValue:n||0,fill:this.colors[J(n,this.state.distribution)]}}}]),e}(jt),oe=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),ae=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},se=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.barOptions=n.barOptions||{},i.lineOptions=n.lineOptions||{},i.type=n.type||"line",i.init=1,i.setup(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),oe(e,[{key:"setMeasures",value:function(){this.data.datasets.length<=1&&(this.config.showLegend=0,this.measures.paddings.bottom=30)}},{key:"configure",value:function(t){ae(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"configure",this).call(this,t),t.axisOptions=t.axisOptions||{},t.tooltipOptions=t.tooltipOptions||{},this.config.xAxisMode=t.axisOptions.xAxisMode||"span",this.config.yAxisMode=t.axisOptions.yAxisMode||"span",this.config.xIsSeries=t.axisOptions.xIsSeries||0,this.config.shortenYAxisNumbers=t.axisOptions.shortenYAxisNumbers||0,this.config.formatTooltipX=t.tooltipOptions.formatTooltipX,this.config.formatTooltipY=t.tooltipOptions.formatTooltipY,this.config.valuesOverPoints=t.valuesOverPoints}},{key:"prepareData",value:function(){return function(t,e){t.labels=t.labels||[];var n=t.labels.length,i=t.datasets,r=new Array(n).fill(0);return i||(i=[{values:r}]),i.map((function(t){if(t.values){var i=t.values;i=(i=i.map((function(t){return isNaN(t)?0:t}))).length>n?i.slice(0,n):c(i,n-i.length,0),t.values=i}else t.values=r;t.chartType||(it.includes(e),t.chartType=e)})),t.yRegions&&t.yRegions.map((function(t){if(t.end<t.start){var e=[t.end,t.start];t.start=e[0],t.end=e[1]}})),t}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data,this.type)}},{key:"prepareFirstData",value:function(){return function(t){var e=t.labels.length,n=new Array(e).fill(0),i={labels:t.labels.slice(0,-1),datasets:t.datasets.map((function(t){return{name:"",values:n.slice(0,-1),chartType:t.chartType}}))};return t.yMarkers&&(i.yMarkers=[{value:0,label:""}]),t.yRegions&&(i.yRegions=[{start:0,end:0,label:""}]),i}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data)}},{key:"calc",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.calcXPositions(),t||this.calcYAxisParameters(this.getAllYValues(),"line"===this.type),this.makeDataByIndex()}},{key:"calcXPositions",value:function(){var t=this.state,e=this.data.labels;t.datasetLength=e.length,t.unitWidth=this.width/t.datasetLength,t.xOffset=t.unitWidth/2,t.xAxis={labels:e,positions:e.map((function(e,n){return u(t.xOffset+n*t.unitWidth)}))}}},{key:"calcYAxisParameters",value:function(t){var e=function(t){function e(t,e){for(var n=G(t),i=n[1]-n[0],r=0,o=1;r<e;o++)r+=i,n.unshift(-1*r);return n}var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Math.max.apply(Math,Y(t)),r=Math.min.apply(Math,Y(t)),o=[];if(i>=0&&r>=0)$(i)[1],o=n?G(i,r):G(i);else if(i>0&&r<0){var a=Math.abs(r);i>=a?($(i)[1],o=e(i,a)):($(a)[1],o=e(a,i).reverse().map((function(t){return-1*t})))}else if(i<=0&&r<=0){var s=Math.abs(r),l=Math.abs(i);$(s)[1],o=(o=n?G(s,l):G(s)).reverse().map((function(t){return-1*t}))}return o}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"false"),n=this.height/function(t){return t[t.length-1]-t[0]}(e),i=K(e)*n,r=this.height-function(t){var e=K(t);return t.indexOf(0)>=0?t.indexOf(0):t[0]>0?-1*t[0]/e:-1*t[t.length-1]/e+(t.length-1)}(e)*i;this.state.yAxis={labels:e,positions:e.map((function(t){return r-t*n})),scaleMultiplier:n,zeroLine:r},this.calcDatasetPoints(),this.calcYExtremes(),this.calcYRegions()}},{key:"calcDatasetPoints",value:function(){var t=this.state,e=function(e){return e.map((function(e){return X(e,t.yAxis)}))};t.datasets=this.data.datasets.map((function(t,n){var i=t.values,r=t.cumulativeYs||[];return{name:t.name&&t.name.replace(/<|>|&/g,(function(t){return"&"==t?"&amp;":"<"==t?"&lt;":"&gt;"})),index:n,chartType:t.chartType,values:i,yPositions:e(i),cumulativeYs:r,cumulativeYPos:e(r)}}))}},{key:"calcYExtremes",value:function(){var t=this.state;this.barOptions.stacked?t.yExtremes=t.datasets[t.datasets.length-1].cumulativeYPos:(t.yExtremes=new Array(t.datasetLength).fill(9999),t.datasets.map((function(e){e.yPositions.map((function(e,n){e<t.yExtremes[n]&&(t.yExtremes[n]=e)}))})))}},{key:"calcYRegions",value:function(){var t=this.state;this.data.yMarkers&&(this.state.yMarkers=this.data.yMarkers.map((function(e){return e.position=X(e.value,t.yAxis),e.options||(e.options={}),e}))),this.data.yRegions&&(this.state.yRegions=this.data.yRegions.map((function(e){return e.startPos=X(e.start,t.yAxis),e.endPos=X(e.end,t.yAxis),e.options||(e.options={}),e})))}},{key:"getAllYValues",value:function(){var t,e=this,n="values";if(this.barOptions.stacked){n="cumulativeYs";var i=new Array(this.state.datasetLength).fill(0);this.data.datasets.map((function(t,r){var o=e.data.datasets[r].values;t[n]=i=i.map((function(t,e){return t+o[e]}))}))}var r=this.data.datasets.map((function(t){return t[n]}));return this.data.yMarkers&&r.push(this.data.yMarkers.map((function(t){return t.value}))),this.data.yRegions&&this.data.yRegions.map((function(t){r.push([t.end,t.start])})),(t=[]).concat.apply(t,tt(r))}},{key:"setupComponents",value:function(){var t=this,e=[["yAxis",{mode:this.config.yAxisMode,width:this.width,shortenNumbers:this.config.shortenYAxisNumbers},function(){return this.state.yAxis}.bind(this)],["xAxis",{mode:this.config.xAxisMode,height:this.height},function(){var t=this.state;return t.xAxis.calcLabels=Q(this.width,t.xAxis.labels,this.config.xIsSeries),t.xAxis}.bind(this)],["yRegions",{width:this.width,pos:"right"},function(){return this.state.yRegions}.bind(this)]],n=this.state.datasets.filter((function(t){return"bar"===t.chartType})),i=this.state.datasets.filter((function(t){return"line"===t.chartType})),r=n.map((function(e){var i=e.index;return["barGraph-"+e.index,{index:i,color:t.colors[i],stacked:t.barOptions.stacked,valuesOverPoints:t.config.valuesOverPoints,minHeight:0*t.height},function(){var t=this.state,e=t.datasets[i],r=this.barOptions.stacked,o=this.barOptions.spaceRatio||.5,a=t.unitWidth*(1-o),s=a/(r?1:n.length),l=t.xAxis.positions.map((function(t){return t-a/2}));r||(l=l.map((function(t){return t+s*i})));var u=new Array(t.datasetLength).fill("");this.config.valuesOverPoints&&(u=r&&e.index===t.datasets.length-1?e.cumulativeYs:e.values);var c=new Array(t.datasetLength).fill(0);return r&&(c=e.yPositions.map((function(t,n){return t-e.cumulativeYPos[n]}))),{xPositions:l,yPositions:e.yPositions,offsets:c,labels:u,zeroLine:t.yAxis.zeroLine,barsWidth:a,barWidth:s}}.bind(t)]})),o=i.map((function(e){var n=e.index;return["lineGraph-"+e.index,{index:n,color:t.colors[n],svgDefs:t.svgDefs,heatline:t.lineOptions.heatline,regionFill:t.lineOptions.regionFill,spline:t.lineOptions.spline,hideDots:t.lineOptions.hideDots,hideLine:t.lineOptions.hideLine,valuesOverPoints:t.config.valuesOverPoints},function(){var t=this.state,e=t.datasets[n],i=t.yAxis.positions[0]<t.yAxis.zeroLine?t.yAxis.positions[0]:t.yAxis.zeroLine;return{xPositions:t.xAxis.positions,yPositions:e.yPositions,values:e.values,zeroLine:i,radius:this.lineOptions.dotSize||4}}.bind(t)]})),a=[["yMarkers",{width:this.width,pos:"right"},function(){return this.state.yMarkers}.bind(this)]];e=e.concat(r,o,a);var s=["yMarkers","yRegions"];this.dataUnitComponents=[],this.components=new Map(e.filter((function(e){return!s.includes(e[0])||t.state[e[0]]})).map((function(e){var n=Z.apply(void 0,tt(e));return(e[0].includes("lineGraph")||e[0].includes("barGraph"))&&t.dataUnitComponents.push(n),[e[0],n]})))}},{key:"makeDataByIndex",value:function(){var t=this;this.dataByIndex={};var e=this.state,n=this.config.formatTooltipX,i=this.config.formatTooltipY;e.xAxis.labels.map((function(r,o){var a=t.state.datasets.map((function(e,n){var r=e.values[o];return{title:e.name,value:r,yPos:e.yPositions[o],color:t.colors[n],formatted:i?i(r):r}}));t.dataByIndex[o]={label:r,formattedLabel:n?n(r):r,xPos:e.xAxis.positions[o],values:a,yExtreme:e.yExtremes[o]}}))}},{key:"bindTooltip",value:function(){var t=this;this.container.addEventListener("mousemove",(function(e){var n=t.measures,i=r(t.container),s=e.pageX-i.left-a(n),l=e.pageY-i.top;l<t.height+o(n)&&l>o(n)?t.mapTooltipXPosition(s):t.tip.hideTip()}))}},{key:"mapTooltipXPosition",value:function(t){var e=this.state;if(e.yExtremes){var n=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),[]);return n?e.indexOf(i):i}(t,e.xAxis.positions,!0);if(n>=0){var i=this.dataByIndex[n];this.tip.setValues(i.xPos+this.tip.offset.x,i.yExtreme+this.tip.offset.y,{name:i.formattedLabel,value:""},i.values,n),this.tip.showTip()}}}},{key:"renderLegend",value:function(){var t=this,e=this.data;e.datasets.length>1&&(this.legendArea.textContent="",e.datasets.map((function(e,n){var i=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",r=arguments[4];r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]?v(r,bt):r;var o={className:"legend-bar",x:0,y:0,width:n,height:"2px",fill:i},a=x("text",{className:"legend-dataset-text",x:0,y:0,dy:2*_t+"px","font-size":1.2*_t+"px","text-anchor":"start",fill:xt,innerHTML:r}),s=x("g",{transform:"translate("+t+", "+e+")"});return s.appendChild(x("rect",o)),s.appendChild(a),s}(100*n,"0",100,t.colors[n],e.name,t.config.truncateLegends);t.legendArea.appendChild(i)})))}},{key:"makeOverlay",value:function(){var t=this;this.init?this.init=0:(this.overlayGuides&&this.overlayGuides.forEach((function(t){var e=t.overlay;e.parentNode.removeChild(e)})),this.overlayGuides=this.dataUnitComponents.map((function(t){return{type:t.unitType,overlay:void 0,units:t.units}})),void 0===this.state.currentIndex&&(this.state.currentIndex=this.state.datasetLength-1),this.overlayGuides.map((function(e){var n=e.units[t.state.currentIndex];e.overlay=kt[e.type](n),t.drawArea.appendChild(e.overlay)})))}},{key:"updateOverlayGuides",value:function(){this.overlayGuides&&this.overlayGuides.forEach((function(t){var e=t.overlay;e.parentNode.removeChild(e)}))}},{key:"bindOverlay",value:function(){var t=this;this.parent.addEventListener("data-select",(function(){t.updateOverlay()}))}},{key:"bindUnits",value:function(){var t=this;this.dataUnitComponents.map((function(e){e.units.map((function(e){e.addEventListener("click",(function(){var n=e.getAttribute("data-point-index");t.setCurrentDataPoint(n)}))}))})),this.tip.container.addEventListener("click",(function(){var e=t.tip.container.getAttribute("data-point-index");t.setCurrentDataPoint(e)}))}},{key:"updateOverlay",value:function(){var t=this;this.overlayGuides.map((function(e){var n=e.units[t.state.currentIndex];St[e.type](n,e.overlay)}))}},{key:"onLeftArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex-1)}},{key:"onRightArrow",value:function(){this.setCurrentDataPoint(this.state.currentIndex+1)}},{key:"getDataPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.currentIndex,e=this.state;return{index:t,label:e.xAxis.labels[t],values:e.datasets.map((function(e){return e.values[t]}))}}},{key:"setCurrentDataPoint",value:function(t){var e=this.state;(t=parseInt(t))<0&&(t=0),t>=e.xAxis.labels.length&&(t=e.xAxis.labels.length-1),t!==e.currentIndex&&(e.currentIndex=t,function(t,e,n){var i=document.createEvent("HTMLEvents");for(var r in i.initEvent(e,!0,!0),n)i[r]=n[r];t.dispatchEvent(i)}(this.parent,"data-select",this.getDataPoint()))}},{key:"addDataPoint",value:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.state.datasetLength;ae(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addDataPoint",this).call(this,t,n,i),this.data.labels.splice(i,0,t),this.data.datasets.map((function(t,e){t.values.splice(i,0,n[e])})),this.update(this.data)}},{key:"removeDataPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.datasetLength-1;this.data.labels.length<=1||(ae(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeDataPoint",this).call(this,t),this.data.labels.splice(t,1),this.data.datasets.map((function(e){e.values.splice(t,1)})),this.update(this.data))}},{key:"updateDataset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.data.datasets[e].values=t,this.update(this.data)}},{key:"updateDatasets",value:function(t){this.data.datasets.map((function(e,n){t[n]&&(e.values=t[n])})),this.update(this.data)}}]),e}(jt),le=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),ue=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},ce=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.type="donut",i.initTimeout=0,i.init=1,i.setup(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),le(e,[{key:"configure",value:function(t){ue(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"configure",this).call(this,t),this.mouseMove=this.mouseMove.bind(this),this.mouseLeave=this.mouseLeave.bind(this),this.hoverRadio=t.hoverRadio||.1,this.config.startAngle=t.startAngle||0,this.clockWise=t.clockWise||!1,this.strokeWidth=t.strokeWidth||30}},{key:"calc",value:function(){var t=this;ue(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"calc",this).call(this);var n=this.state;this.radius=this.height>this.width?this.center.x-this.strokeWidth/2:this.center.y-this.strokeWidth/2;var i=this.radius,r=this.clockWise,o=n.slicesProperties||[];n.sliceStrings=[],n.slicesProperties=[];var a=180-this.config.startAngle;n.sliceTotals.map((function(e,s){var l=a,u=e/n.grandTotal*360,c=u>180?1:0,h=r?-u:u,f=a+=h,p=d(l,i),m=d(f,i),g=t.init&&o[s],v=void 0,y=void 0;t.init?(v=g?g.startPosition:p,y=g?g.endPosition:p):(v=p,y=m);var b=360===u?function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=n.x+t.x,s=n.y+t.y,l=n.x+e.x,u=2*i+s;return"M"+a+" "+s+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+u+"\n\t\tM"+a+" "+u+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+l+" "+(n.y+t.y)}(v,y,t.center,t.radius,t.clockWise,c):function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;return"M"+(n.x+t.x)+" "+(n.y+t.y)+"\n\t\tA "+i+" "+i+" 0 "+o+" "+(r?1:0)+"\n\t\t"+(n.x+e.x)+" "+(n.y+e.y)}(v,y,t.center,t.radius,t.clockWise,c);n.sliceStrings.push(b),n.slicesProperties.push({startPosition:p,endPosition:m,value:e,total:n.grandTotal,startAngle:l,endAngle:f,angle:h})})),this.init=0}},{key:"setupComponents",value:function(){var t=this.state,e=[["donutSlices",{},function(){return{sliceStrings:t.sliceStrings,colors:this.colors,strokeWidth:this.strokeWidth}}.bind(this)]];this.components=new Map(e.map((function(t){var e=Z.apply(void 0,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(t));return[t[0],e]})))}},{key:"calTranslateByAngle",value:function(t){var e=this.radius,n=this.hoverRadio,i=d(t.startAngle+t.angle/2,e);return"translate3d("+i.x*n+"px,"+i.y*n+"px,0)"}},{key:"hoverSlice",value:function(t,e,n,i){if(t){var o=this.colors[e];if(n){j(t,this.calTranslateByAngle(this.state.slicesProperties[e])),t.style.stroke=_(o,50);var a=r(this.svg),s=i.pageX-a.left+10,l=i.pageY-a.top-10,u=(this.formatted_labels&&this.formatted_labels.length>0?this.formatted_labels[e]:this.state.labels[e])+": ",c=(100*this.state.sliceTotals[e]/this.state.grandTotal).toFixed(1);this.tip.setValues(s,l,{name:u,value:c+"%"}),this.tip.showTip()}else j(t,"translate3d(0,0,0)"),this.tip.hideTip(),t.style.stroke=o}}},{key:"bindTooltip",value:function(){this.container.addEventListener("mousemove",this.mouseMove),this.container.addEventListener("mouseleave",this.mouseLeave)}},{key:"mouseMove",value:function(t){var e=t.target,n=this.components.get("donutSlices").store,i=this.curActiveSliceIndex,r=this.curActiveSlice;if(n.includes(e)){var o=n.indexOf(e);this.hoverSlice(r,i,!1),this.curActiveSlice=e,this.curActiveSliceIndex=o,this.hoverSlice(e,o,!0,t)}else this.mouseLeave()}},{key:"mouseLeave",value:function(){this.hoverSlice(this.curActiveSlice,this.curActiveSliceIndex,!1)}}]),e}(Ft),he={bar:se,line:se,percentage:Kt,heatmap:re,pie:Qt,donut:ce},de=function t(e,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"line",e=arguments[1],n=arguments[2];return"axis-mixed"===t?(n.type="line",new se(e,n)):he[t]?new he[t](e,n):void 0}(n.type,e,n)}},1660:function(t){"undefined"!=typeof self&&self,t.exports=function(){"use strict";var t={8741:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.default=n},3976:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(2839),r={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:function(){},onincomplete:function(){},oncleared:function(){},repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:function(){},onBeforeMask:null,onBeforePaste:function(t,e){return"function"==typeof e.onBeforeMask?e.onBeforeMask.call(this,t,e):t},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:function(){},skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],ignorables:[i.keys.Backspace,i.keys.Tab,i.keys.Pause,i.keys.Escape,i.keys.PageUp,i.keys.PageDown,i.keys.End,i.keys.Home,i.keys.ArrowLeft,i.keys.ArrowUp,i.keys.ArrowRight,i.keys.ArrowDown,i.keys.Insert,i.keys.Delete,i.keys.ContextMenu,i.keys.F1,i.keys.F2,i.keys.F3,i.keys.F4,i.keys.F5,i.keys.F6,i.keys.F7,i.keys.F8,i.keys.F9,i.keys.F10,i.keys.F11,i.keys.F12,i.keys.Process,i.keys.Unidentified,i.keys.Shift,i.keys.Control,i.keys.Alt,i.keys.Tab,i.keys.AltGraph,i.keys.CapsLock],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}};e.default=r},7392:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={9:{validator:"[0-9０-９]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-9０-９A-Za-zА-яЁёÀ-ÿµ]"}}},253:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(void 0===n)return t.__data?t.__data[e]:null;t.__data=t.__data||{},t.__data[e]=n}},3776:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Event=void 0,e.off=function(t,e){var n,i;return h(this[0])&&t&&(n=this[0].eventRegistry,i=this[0],t.split(" ").forEach((function(t){var r=l(t.split("."),2);(function(t,i){var r,o,a=[];if(t.length>0)if(void 0===e)for(r=0,o=n[t][i].length;r<o;r++)a.push({ev:t,namespace:i&&i.length>0?i:"global",handler:n[t][i][r]});else a.push({ev:t,namespace:i&&i.length>0?i:"global",handler:e});else if(i.length>0)for(var s in n)for(var l in n[s])if(l===i)if(void 0===e)for(r=0,o=n[s][l].length;r<o;r++)a.push({ev:s,namespace:l,handler:n[s][l][r]});else a.push({ev:s,namespace:l,handler:e});return a})(r[0],r[1]).forEach((function(t){var e=t.ev,r=t.handler;!function(t,e,r){if(t in n==1)if(i.removeEventListener?i.removeEventListener(t,r,!1):i.detachEvent&&i.detachEvent("on".concat(t),r),"global"===e)for(var o in n[t])n[t][o].splice(n[t][o].indexOf(r),1);else n[t][e].splice(n[t][e].indexOf(r),1)}(e,t.namespace,r)}))}))),this},e.on=function(t,e){if(h(this[0])){var n=this[0].eventRegistry,i=this[0];t.split(" ").forEach((function(t){var r=l(t.split("."),2),o=r[0],a=r[1];!function(t,r){i.addEventListener?i.addEventListener(t,e,!1):i.attachEvent&&i.attachEvent("on".concat(t),e),n[t]=n[t]||{},n[t][r]=n[t][r]||[],n[t][r].push(e)}(o,void 0===a?"global":a)}))}return this},e.trigger=function(t){var e=arguments;if(h(this[0]))for(var n=this[0].eventRegistry,i=this[0],o="string"==typeof t?t.split(" "):[t.type],s=0;s<o.length;s++){var l=o[s].split("."),u=l[0],c=l[1]||"global";if(void 0!==document&&"global"===c){var d,f={bubbles:!0,cancelable:!0,composed:!0,detail:arguments[1]};if(document.createEvent){try{"input"===u?(f.inputType="insertText",d=new InputEvent(u,f)):d=new CustomEvent(u,f)}catch(t){(d=document.createEvent("CustomEvent")).initCustomEvent(u,f.bubbles,f.cancelable,f.detail)}t.type&&(0,r.default)(d,t),i.dispatchEvent(d)}else(d=document.createEventObject()).eventType=u,d.detail=arguments[1],t.type&&(0,r.default)(d,t),i.fireEvent("on"+d.eventType,d)}else if(void 0!==n[u]){arguments[0]=arguments[0].type?arguments[0]:a.default.Event(arguments[0]),arguments[0].detail=arguments.slice(1);var p=n[u];("global"===c?Object.values(p).flat():p[c]).forEach((function(t){return t.apply(i,e)}))}}return this};var i,r=c(n(600)),o=c(n(9380)),a=c(n(4963)),s=c(n(8741));function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function c(t){return t&&t.__esModule?t:{default:t}}function h(t){return t instanceof Element}e.Event=i,"function"==typeof o.default.CustomEvent?e.Event=i=o.default.CustomEvent:s.default&&(e.Event=i=function(t,e){e=e||{bubbles:!1,cancelable:!1,composed:!0,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n},i.prototype=o.default.Event.prototype)},600:function(t,e){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(){var e,i,r,o,a,s,l=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof l&&(h=l,l=arguments[u]||{},u++),"object"!==n(l)&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(e=arguments[u]))for(i in e)r=l[i],l!==(o=e[i])&&(h&&o&&("[object Object]"===Object.prototype.toString.call(o)||(a=Array.isArray(o)))?(a?(a=!1,s=r&&Array.isArray(r)?r:[]):s=r&&"[object Object]"===Object.prototype.toString.call(r)?r:{},l[i]=t(h,s,o)):void 0!==o&&(l[i]=o));return l}},4963:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(n(600)),r=s(n(9380)),o=s(n(253)),a=n(3776);function s(t){return t&&t.__esModule?t:{default:t}}var l=r.default.document;function u(t){return t instanceof u?t:this instanceof u?void(null!=t&&t!==r.default&&(this[0]=t.nodeName?t:void 0!==t[0]&&t[0].nodeName?t[0]:l.querySelector(t),void 0!==this[0]&&null!==this[0]&&(this[0].eventRegistry=this[0].eventRegistry||{}))):new u(t)}u.prototype={on:a.on,off:a.off,trigger:a.trigger},u.extend=i.default,u.data=o.default,u.Event=a.Event;var c=u;e.default=c},9845:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.mobile=e.iphone=e.ie=void 0;var i,r=(i=n(9380))&&i.__esModule?i:{default:i},o=r.default.navigator&&r.default.navigator.userAgent||"",a=o.indexOf("MSIE ")>0||o.indexOf("Trident/")>0,s=navigator.userAgentData&&navigator.userAgentData.mobile||r.default.navigator&&r.default.navigator.maxTouchPoints||"ontouchstart"in r.default,l=/iphone/i.test(o);e.iphone=l,e.mobile=s,e.ie=a},7184:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.replace(n,"\\$1")};var n=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EventHandlers=void 0;var i=n(8711),r=n(2839),o=n(9845),a=n(7215),s=n(7760),l=n(4713);function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var h={keyEvent:function(t,e,n,u,c){var d=this.inputmask,f=d.opts,p=d.dependencyLib,m=d.maskset,g=this,v=p(g),y=t.key,b=i.caret.call(d,g),_=f.onKeyDown.call(this,t,i.getBuffer.call(d),b,f);if(void 0!==_)return _;if(y===r.keys.Backspace||y===r.keys.Delete||o.iphone&&y===r.keys.BACKSPACE_SAFARI||t.ctrlKey&&y===r.keys.x&&!("oncut"in g))t.preventDefault(),a.handleRemove.call(d,g,y,b),(0,s.writeBuffer)(g,i.getBuffer.call(d,!0),m.p,t,g.inputmask._valueGet()!==i.getBuffer.call(d).join(""));else if(y===r.keys.End||y===r.keys.PageDown){t.preventDefault();var w=i.seekNext.call(d,i.getLastValidPosition.call(d));i.caret.call(d,g,t.shiftKey?b.begin:w,w,!0)}else y===r.keys.Home&&!t.shiftKey||y===r.keys.PageUp?(t.preventDefault(),i.caret.call(d,g,0,t.shiftKey?b.begin:0,!0)):f.undoOnEscape&&y===r.keys.Escape&&!0!==t.altKey?((0,s.checkVal)(g,!0,!1,d.undoValue.split("")),v.trigger("click")):y!==r.keys.Insert||t.shiftKey||t.ctrlKey||void 0!==d.userOptions.insertMode?!0===f.tabThrough&&y===r.keys.Tab?!0===t.shiftKey?(b.end=i.seekPrevious.call(d,b.end,!0),!0===l.getTest.call(d,b.end-1).match.static&&b.end--,b.begin=i.seekPrevious.call(d,b.end,!0),b.begin>=0&&b.end>0&&(t.preventDefault(),i.caret.call(d,g,b.begin,b.end))):(b.begin=i.seekNext.call(d,b.begin,!0),b.end=i.seekNext.call(d,b.begin,!0),b.end<m.maskLength&&b.end--,b.begin<=m.maskLength&&(t.preventDefault(),i.caret.call(d,g,b.begin,b.end))):t.shiftKey||f.insertModeVisual&&!1===f.insertMode&&(y===r.keys.ArrowRight?setTimeout((function(){var t=i.caret.call(d,g);i.caret.call(d,g,t.begin)}),0):y===r.keys.ArrowLeft&&setTimeout((function(){var t=i.translatePosition.call(d,g.inputmask.caretPos.begin);i.translatePosition.call(d,g.inputmask.caretPos.end),d.isRTL?i.caret.call(d,g,t+(t===m.maskLength?0:1)):i.caret.call(d,g,t-(0===t?0:1))}),0)):a.isSelection.call(d,b)?f.insertMode=!f.insertMode:(f.insertMode=!f.insertMode,i.caret.call(d,g,b.begin,b.begin));return d.isComposing=y==r.keys.Process||y==r.keys.Unidentified,d.ignorable=f.ignorables.includes(y),h.keypressEvent.call(this,t,e,n,u,c)},keypressEvent:function(t,e,n,o,l){var u=this.inputmask||this,c=u.opts,h=u.dependencyLib,d=u.maskset,f=u.el,p=h(f),m=t.key;if(!0===e||t.ctrlKey&&t.altKey||!(t.ctrlKey||t.metaKey||u.ignorable)){if(m){var g,v=e?{begin:l,end:l}:i.caret.call(u,f);m=c.substitutes[m]||m,d.writeOutBuffer=!0;var y=a.isValid.call(u,v,m,o,void 0,void 0,void 0,e);if(!1!==y&&(i.resetMaskSet.call(u,!0),g=void 0!==y.caret?y.caret:i.seekNext.call(u,y.pos.begin?y.pos.begin:y.pos),d.p=g),g=c.numericInput&&void 0===y.caret?i.seekPrevious.call(u,g):g,!1!==n&&(setTimeout((function(){c.onKeyValidation.call(f,m,y)}),0),d.writeOutBuffer&&!1!==y)){var b=i.getBuffer.call(u);(0,s.writeBuffer)(f,b,g,t,!0!==e)}if(t.preventDefault(),e)return!1!==y&&(y.forwardPosition=g),y}}else m===r.keys.Enter&&u.undoValue!==u._valueGet(!0)&&(u.undoValue=u._valueGet(!0),setTimeout((function(){p.trigger("change")}),0))},pasteEvent:function(t){var e,n=this.inputmask,r=n.opts,o=n._valueGet(!0),a=i.caret.call(n,this);n.isRTL&&(e=a.end,a.end=i.translatePosition.call(n,a.begin),a.begin=i.translatePosition.call(n,e));var l=o.substr(0,a.begin),c=o.substr(a.end,o.length);if(l==(n.isRTL?i.getBufferTemplate.call(n).slice().reverse():i.getBufferTemplate.call(n)).slice(0,a.begin).join("")&&(l=""),c==(n.isRTL?i.getBufferTemplate.call(n).slice().reverse():i.getBufferTemplate.call(n)).slice(a.end).join("")&&(c=""),window.clipboardData&&window.clipboardData.getData)o=l+window.clipboardData.getData("Text")+c;else{if(!t.clipboardData||!t.clipboardData.getData)return!0;o=l+t.clipboardData.getData("text/plain")+c}var h=o;if(n.isRTL){h=h.split("");var d,f=u(i.getBufferTemplate.call(n));try{for(f.s();!(d=f.n()).done;){var p=d.value;h[0]===p&&h.shift()}}catch(t){f.e(t)}finally{f.f()}h=h.join("")}if("function"==typeof r.onBeforePaste){if(!1===(h=r.onBeforePaste.call(n,h,r)))return!1;h||(h=o)}(0,s.checkVal)(this,!0,!1,h.toString().split(""),t),t.preventDefault()},inputFallBackEvent:function(t){var e,n=this.inputmask,a=n.opts,u=n.dependencyLib,c=this,d=c.inputmask._valueGet(!0),f=(n.isRTL?i.getBuffer.call(n).slice().reverse():i.getBuffer.call(n)).join(""),p=i.caret.call(n,c,void 0,void 0,!0);if(f!==d){if(e=function(t,e,r){for(var o,s,u,c=t.substr(0,r.begin).split(""),h=t.substr(r.begin).split(""),d=e.substr(0,r.begin).split(""),f=e.substr(r.begin).split(""),p=c.length>=d.length?c.length:d.length,m=h.length>=f.length?h.length:f.length,g="",v=[],y="~";c.length<p;)c.push(y);for(;d.length<p;)d.push(y);for(;h.length<m;)h.unshift(y);for(;f.length<m;)f.unshift(y);var b=c.concat(h),_=d.concat(f);for(s=0,o=b.length;s<o;s++)switch(u=l.getPlaceholder.call(n,i.translatePosition.call(n,s)),g){case"insertText":_[s-1]===b[s]&&r.begin==b.length-1&&v.push(b[s]),s=o;break;case"insertReplacementText":case"deleteContentBackward":b[s]===y?r.end++:s=o;break;default:b[s]!==_[s]&&(b[s+1]!==y&&b[s+1]!==u&&void 0!==b[s+1]||(_[s]!==u||_[s+1]!==y)&&_[s]!==y?_[s+1]===y&&_[s]===b[s+1]?(g="insertText",v.push(b[s]),r.begin--,r.end--):b[s]!==u&&b[s]!==y&&(b[s+1]===y||_[s]!==b[s]&&_[s+1]===b[s+1])?(g="insertReplacementText",v.push(b[s]),r.begin--):b[s]===y?(g="deleteContentBackward",(i.isMask.call(n,i.translatePosition.call(n,s),!0)||_[s]===a.radixPoint)&&r.end++):s=o:(g="insertText",v.push(b[s]),r.begin--,r.end--))}return{action:g,data:v,caret:r}}(d,f,p),(c.inputmask.shadowRoot||c.ownerDocument).activeElement!==c&&c.focus(),(0,s.writeBuffer)(c,i.getBuffer.call(n)),i.caret.call(n,c,p.begin,p.end,!0),!o.mobile&&n.skipNextInsert&&"insertText"===t.inputType&&"insertText"===e.action&&n.isComposing)return!1;switch("insertCompositionText"===t.inputType&&"insertText"===e.action&&n.isComposing?n.skipNextInsert=!0:n.skipNextInsert=!1,e.action){case"insertText":case"insertReplacementText":e.data.forEach((function(t,e){var i=new u.Event("keypress");i.key=t,n.ignorable=!1,h.keypressEvent.call(c,i)})),setTimeout((function(){n.$el.trigger("keyup")}),0);break;case"deleteContentBackward":var m=new u.Event("keydown");m.key=r.keys.Backspace,h.keyEvent.call(c,m);break;default:(0,s.applyInputValue)(c,d),i.caret.call(n,c,p.begin,p.end,!0)}t.preventDefault()}},setValueEvent:function(t){var e=this.inputmask,n=this,r=t&&t.detail?t.detail[0]:arguments[1];void 0===r&&(r=n.inputmask._valueGet(!0)),(0,s.applyInputValue)(n,r),(t.detail&&void 0!==t.detail[1]||void 0!==arguments[2])&&i.caret.call(e,n,t.detail?t.detail[1]:arguments[2])},focusEvent:function(t){var e=this.inputmask,n=e.opts,r=null==e?void 0:e._valueGet();n.showMaskOnFocus&&r!==i.getBuffer.call(e).join("")&&(0,s.writeBuffer)(this,i.getBuffer.call(e),i.seekNext.call(e,i.getLastValidPosition.call(e))),!0!==n.positionCaretOnTab||!1!==e.mouseEnter||a.isComplete.call(e,i.getBuffer.call(e))&&-1!==i.getLastValidPosition.call(e)||h.clickEvent.apply(this,[t,!0]),e.undoValue=null==e?void 0:e._valueGet(!0)},invalidEvent:function(t){this.inputmask.validationEvent=!0},mouseleaveEvent:function(){var t=this.inputmask,e=t.opts,n=this;t.mouseEnter=!1,e.clearMaskOnLostFocus&&(n.inputmask.shadowRoot||n.ownerDocument).activeElement!==n&&(0,s.HandleNativePlaceholder)(n,t.originalPlaceholder)},clickEvent:function(t,e){var n=this.inputmask;n.clicked++;var r=this;if((r.inputmask.shadowRoot||r.ownerDocument).activeElement===r){var o=i.determineNewCaretPosition.call(n,i.caret.call(n,r),e);void 0!==o&&i.caret.call(n,r,o)}},cutEvent:function(t){var e=this.inputmask,n=e.maskset,o=this,l=i.caret.call(e,o),u=e.isRTL?i.getBuffer.call(e).slice(l.end,l.begin):i.getBuffer.call(e).slice(l.begin,l.end),c=e.isRTL?u.reverse().join(""):u.join("");window.navigator.clipboard?window.navigator.clipboard.writeText(c):window.clipboardData&&window.clipboardData.getData&&window.clipboardData.setData("Text",c),a.handleRemove.call(e,o,r.keys.Delete,l),(0,s.writeBuffer)(o,i.getBuffer.call(e),n.p,t,e.undoValue!==e._valueGet(!0))},blurEvent:function(t){var e=this.inputmask,n=e.opts,r=e.dependencyLib;e.clicked=0;var o=r(this),l=this;if(l.inputmask){(0,s.HandleNativePlaceholder)(l,e.originalPlaceholder);var u=l.inputmask._valueGet(),c=i.getBuffer.call(e).slice();""!==u&&(n.clearMaskOnLostFocus&&(-1===i.getLastValidPosition.call(e)&&u===i.getBufferTemplate.call(e).join("")?c=[]:s.clearOptionalTail.call(e,c)),!1===a.isComplete.call(e,c)&&(setTimeout((function(){o.trigger("incomplete")}),0),n.clearIncomplete&&(i.resetMaskSet.call(e),c=n.clearMaskOnLostFocus?[]:i.getBufferTemplate.call(e).slice())),(0,s.writeBuffer)(l,c,void 0,t)),e.undoValue!==e._valueGet(!0)&&(e.undoValue=e._valueGet(!0),o.trigger("change"))}},mouseenterEvent:function(){var t=this.inputmask,e=t.opts.showMaskOnHover,n=this;if(t.mouseEnter=!0,(n.inputmask.shadowRoot||n.ownerDocument).activeElement!==n){var r=(t.isRTL?i.getBufferTemplate.call(t).slice().reverse():i.getBufferTemplate.call(t)).join("");e&&(0,s.HandleNativePlaceholder)(n,r)}},submitEvent:function(){var t=this.inputmask,e=t.opts;t.undoValue!==t._valueGet(!0)&&t.$el.trigger("change"),-1===i.getLastValidPosition.call(t)&&t._valueGet&&t._valueGet()===i.getBufferTemplate.call(t).join("")&&t._valueSet(""),e.clearIncomplete&&!1===a.isComplete.call(t,i.getBuffer.call(t))&&t._valueSet(""),e.removeMaskOnSubmit&&(t._valueSet(t.unmaskedvalue(),!0),setTimeout((function(){(0,s.writeBuffer)(t.el,i.getBuffer.call(t))}),0))},resetEvent:function(){var t=this.inputmask;t.refreshValue=!0,setTimeout((function(){(0,s.applyInputValue)(t.el,t._valueGet(!0))}),0)}};e.EventHandlers=h},9716:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EventRuler=void 0;var i,r=(i=n(2394))&&i.__esModule?i:{default:i},o=n(2839),a=n(8711),s=n(7760),l={on:function(t,e,n){var i=t.inputmask.dependencyLib,l=function(e){e.originalEvent&&(e=e.originalEvent||e,arguments[0]=e);var l,u=this,c=u.inputmask,h=c?c.opts:void 0;if(void 0===c&&"FORM"!==this.nodeName){var d=i.data(u,"_inputmask_opts");i(u).off(),d&&new r.default(d).mask(u)}else{if(["submit","reset","setvalue"].includes(e.type)||"FORM"===this.nodeName||!(u.disabled||u.readOnly&&!("keydown"===e.type&&e.ctrlKey&&e.key===o.keys.c||!1===h.tabThrough&&e.key===o.keys.Tab))){switch(e.type){case"input":if(!0===c.skipInputEvent)return c.skipInputEvent=!1,e.preventDefault();break;case"click":case"focus":return c.validationEvent?(c.validationEvent=!1,t.blur(),(0,s.HandleNativePlaceholder)(t,(c.isRTL?a.getBufferTemplate.call(c).slice().reverse():a.getBufferTemplate.call(c)).join("")),setTimeout((function(){t.focus()}),h.validationEventTimeOut),!1):(l=arguments,void setTimeout((function(){t.inputmask&&n.apply(u,l)}),0))}var f=n.apply(u,arguments);return!1===f&&(e.preventDefault(),e.stopPropagation()),f}e.preventDefault()}};["submit","reset"].includes(e)?(l=l.bind(t),null!==t.form&&i(t.form).on(e,l)):i(t).on(e,l),t.inputmask.events[e]=t.inputmask.events[e]||[],t.inputmask.events[e].push(l)},off:function(t,e){if(t.inputmask&&t.inputmask.events){var n=t.inputmask.dependencyLib,i=t.inputmask.events;for(var r in e&&((i=[])[e]=t.inputmask.events[e]),i){for(var o=i[r];o.length>0;){var a=o.pop();["submit","reset"].includes(r)?null!==t.form&&n(t.form).off(r,a):n(t).off(r,a)}delete t.inputmask.events[r]}}}};e.EventRuler=l},219:function(t,e,n){var i=d(n(2394)),r=n(2839),o=d(n(7184)),a=n(8711),s=n(4713);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function h(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(r=void 0,r=function(t,e){if("object"!==c(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==c(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i.key,"string"),"symbol"===c(r)?r:String(r)),i)}var r}function d(t){return t&&t.__esModule?t:{default:t}}var f=i.default.dependencyLib,p=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mask=e,this.format=n,this.opts=i,this._date=new Date(1,0,1),this.initDateObject(e,this.opts)}var e,n,i;return e=t,(n=[{key:"date",get:function(){return void 0===this._date&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts)),this._date}},{key:"initDateObject",value:function(t,e){var n;for(x(e).lastIndex=0;n=x(e).exec(this.format);){var i=new RegExp("\\d+$").exec(n[0]),r=i?n[0][0]+"x":n[0],o=void 0;if(void 0!==t){if(i){var a=x(e).lastIndex,s=E(n.index,e);x(e).lastIndex=a,o=t.slice(0,t.indexOf(s.nextMatch[0]))}else o=t.slice(0,v[r]&&v[r][4]||r.length);t=t.slice(o.length)}Object.prototype.hasOwnProperty.call(v,r)&&this.setValue(this,o,r,v[r][2],v[r][1])}}},{key:"setValue",value:function(t,e,n,i,r){if(void 0!==e&&(t[i]="ampm"===i?e:e.replace(/[^0-9]/g,"0"),t["raw"+i]=e.replace(/\s/g,"_")),void 0!==r){var o=t[i];("day"===i&&29===parseInt(o)||"month"===i&&2===parseInt(o))&&(29!==parseInt(t.day)||2!==parseInt(t.month)||""!==t.year&&void 0!==t.year||t._date.setFullYear(2012,1,29)),"day"===i&&(g=!0,0===parseInt(o)&&(o=1)),"month"===i&&(g=!0),"year"===i&&(g=!0,o.length<4&&(o=C(o,4,!0))),""===o||isNaN(o)||r.call(t._date,o),"ampm"===i&&r.call(t._date,o)}}},{key:"reset",value:function(){this._date=new Date(1,0,1)}},{key:"reInit",value:function(){this._date=void 0,this.date}}])&&h(e.prototype,n),i&&h(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}(),m=(new Date).getFullYear(),g=!1,v={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return C(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(t){var e=t?parseInt(t):0;return e>0&&e--,Date.prototype.setMonth.call(this,e)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(t){var e=t?parseInt(t):0;return e>0&&e--,Date.prototype.setMonth.call(this,e)},"month",function(){return C(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return C(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return C(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return C(Date.prototype.getHours.call(this),2)}],hx:[function(t){return"[0-9]{".concat(t,"}")},Date.prototype.setHours,"hours",function(t){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return C(Date.prototype.getHours.call(this),2)}],Hx:[function(t){return"[0-9]{".concat(t,"}")},Date.prototype.setHours,"hours",function(t){return function(){return C(Date.prototype.getHours.call(this),t)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return C(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return C(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return C(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return C(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",b,"ampm",_,1],tt:["[ap]m",b,"ampm",_,2],T:["[AP]",b,"ampm",_,1],TT:["[AP]M",b,"ampm",_,2],Z:[".*",void 0,"Z",function(){var t=this.toString().match(/\((.+)\)/)[1];return t.includes(" ")&&(t=(t=t.replace("-"," ").toUpperCase()).split(" ").map((function(t){return l(t,1)[0]})).join("")),t}],o:[""],S:[""]},y={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function b(t){var e=this.getHours();t.toLowerCase().includes("p")?this.setHours(e+12):t.toLowerCase().includes("a")&&e>=12&&this.setHours(e-12)}function _(){var t=this.getHours();return(t=t||12)>=12?"PM":"AM"}function w(t){var e=new RegExp("\\d+$").exec(t[0]);if(e&&void 0!==e[0]){var n=v[t[0][0]+"x"].slice("");return n[0]=n[0](e[0]),n[3]=n[3](e[0]),n}if(v[t[0]])return v[t[0]]}function x(t){if(!t.tokenizer){var e=[],n=[];for(var i in v)if(/\.*x$/.test(i)){var r=i[0]+"\\d+";-1===n.indexOf(r)&&n.push(r)}else-1===e.indexOf(i[0])&&e.push(i[0]);t.tokenizer="("+(n.length>0?n.join("|")+"|":"")+e.join("+|")+")+?|.",t.tokenizer=new RegExp(t.tokenizer,"g")}return t.tokenizer}function k(t,e,n){if(!g)return!0;if(void 0===t.rawday||!isFinite(t.rawday)&&new Date(t.date.getFullYear(),isFinite(t.rawmonth)?t.month:t.date.getMonth()+1,0).getDate()>=t.day||"29"==t.day&&(!isFinite(t.rawyear)||void 0===t.rawyear||""===t.rawyear)||new Date(t.date.getFullYear(),isFinite(t.rawmonth)?t.month:t.date.getMonth()+1,0).getDate()>=t.day)return e;if("29"==t.day){var i=E(e.pos,n);if("yyyy"===i.targetMatch[0]&&e.pos-i.targetMatchIndex==2)return e.remove=e.pos+1,e}else if("02"==t.month&&"30"==t.day&&void 0!==e.c)return t.day="03",t.date.setDate(3),t.date.setMonth(1),e.insert=[{pos:e.pos,c:"0"},{pos:e.pos+1,c:e.c}],e.caret=a.seekNext.call(this,e.pos+1),e;return!1}function S(t,e,n,i){var r,a,s="";for(x(n).lastIndex=0;r=x(n).exec(t);)if(void 0===e)if(a=w(r))s+="("+a[0]+")";else switch(r[0]){case"[":s+="(";break;case"]":s+=")?";break;default:s+=(0,o.default)(r[0])}else(a=w(r))?!0!==i&&a[3]?s+=a[3].call(e.date):a[2]?s+=e["raw"+a[2]]:s+=r[0]:s+=r[0];return s}function C(t,e,n){for(t=String(t),e=e||2;t.length<e;)t=n?t+"0":"0"+t;return t}function T(t,e,n){return"string"==typeof t?new p(t,e,n):t&&"object"===c(t)&&Object.prototype.hasOwnProperty.call(t,"date")?t:void 0}function O(t,e){return S(e.inputFormat,{date:t},e)}function E(t,e){var n,i,r=0,o=0;for(x(e).lastIndex=0;i=x(e).exec(e.inputFormat);){var a=new RegExp("\\d+$").exec(i[0]);if((r+=o=a?parseInt(a[0]):i[0].length)>=t+1){n=i,i=x(e).exec(e.inputFormat);break}}return{targetMatchIndex:r-o,nextMatch:i,targetMatch:n}}i.default.extendAliases({datetime:{mask:function(t){return t.numericInput=!1,v.S=t.i18n.ordinalSuffix.join("|"),t.inputFormat=y[t.inputFormat]||t.inputFormat,t.displayFormat=y[t.displayFormat]||t.displayFormat||t.inputFormat,t.outputFormat=y[t.outputFormat]||t.outputFormat||t.inputFormat,t.placeholder=""!==t.placeholder?t.placeholder:t.inputFormat.replace(/[[\]]/,""),t.regex=S(t.inputFormat,void 0,t),t.min=T(t.min,t.inputFormat,t),t.max=T(t.max,t.inputFormat,t),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},preValidation:function(t,e,n,i,r,o,a,s){if(s)return!0;if(isNaN(n)&&t[e]!==n){var l=E(e,r);if(l.nextMatch&&l.nextMatch[0]===n&&l.targetMatch[0].length>1){var u=v[l.targetMatch[0]][0];if(new RegExp(u).test("0"+t[e-1]))return t[e]=t[e-1],t[e-1]="0",{fuzzy:!0,buffer:t,refreshFromBuffer:{start:e-1,end:e+1},pos:e+1}}}return!0},postValidation:function(t,e,n,i,r,o,a,l){var u,c;if(a)return!0;if(!1===i&&(((u=E(e+1,r)).targetMatch&&u.targetMatchIndex===e&&u.targetMatch[0].length>1&&void 0!==v[u.targetMatch[0]]||(u=E(e+2,r)).targetMatch&&u.targetMatchIndex===e+1&&u.targetMatch[0].length>1&&void 0!==v[u.targetMatch[0]])&&(c=v[u.targetMatch[0]][0]),void 0!==c&&(void 0!==o.validPositions[e+1]&&new RegExp(c).test(n+"0")?(t[e]=n,t[e+1]="0",i={pos:e+2,caret:e}):new RegExp(c).test("0"+n)&&(t[e]="0",t[e+1]=n,i={pos:e+2})),!1===i))return i;if(i.fuzzy&&(t=i.buffer,e=i.pos),(u=E(e,r)).targetMatch&&u.targetMatch[0]&&void 0!==v[u.targetMatch[0]]){var h=v[u.targetMatch[0]];c=h[0];var d=t.slice(u.targetMatchIndex,u.targetMatchIndex+u.targetMatch[0].length);if(!1===new RegExp(c).test(d.join(""))&&2===u.targetMatch[0].length&&o.validPositions[u.targetMatchIndex]&&o.validPositions[u.targetMatchIndex+1]&&(o.validPositions[u.targetMatchIndex+1].input="0"),"year"==h[2])for(var f=s.getMaskTemplate.call(this,!1,1,void 0,!0),p=e+1;p<t.length;p++)t[p]=f[p],delete o.validPositions[p]}var g=i,y=T(t.join(""),r.inputFormat,r);return g&&!isNaN(y.date.getTime())&&(r.prefillYear&&(g=function(t,e,n){if(t.year!==t.rawyear){var i=m.toString(),r=t.rawyear.replace(/[^0-9]/g,""),o=i.slice(0,r.length),a=i.slice(r.length);if(2===r.length&&r===o){var s=new Date(m,t.month-1,t.day);t.day==s.getDate()&&(!n.max||n.max.date.getTime()>=s.getTime())&&(t.date.setFullYear(m),t.year=i,e.insert=[{pos:e.pos+1,c:a[0]},{pos:e.pos+2,c:a[1]}])}}return e}(y,g,r)),g=function(t,e,n,i,r){if(!e)return e;if(e&&n.min&&!isNaN(n.min.date.getTime())){var o;for(t.reset(),x(n).lastIndex=0;o=x(n).exec(n.inputFormat);){var a;if((a=w(o))&&a[3]){for(var s=a[1],l=t[a[2]],u=n.min[a[2]],c=n.max?n.max[a[2]]:u,h=[],d=!1,f=0;f<u.length;f++)void 0!==i.validPositions[f+o.index]||d?(h[f]=l[f],d=d||l[f]>u[f]):(h[f]=u[f],"year"===a[2]&&l.length-1==f&&u!=c&&(h=(parseInt(h.join(""))+1).toString().split("")),"ampm"===a[2]&&u!=c&&n.min.date.getTime()>t.date.getTime()&&(h[f]=c[f]));s.call(t._date,h.join(""))}}e=n.min.date.getTime()<=t.date.getTime(),t.reInit()}return e&&n.max&&(isNaN(n.max.date.getTime())||(e=n.max.date.getTime()>=t.date.getTime())),e}(y,g=k.call(this,y,g,r),r,o)),void 0!==e&&g&&i.pos!==e?{buffer:S(r.inputFormat,y,r).split(""),refreshFromBuffer:{start:e,end:i.pos},pos:i.caret||i.pos}:g},onKeyDown:function(t,e,n,i){t.ctrlKey&&t.key===r.keys.ArrowRight&&(this.inputmask._valueSet(O(new Date,i)),f(this).trigger("setvalue"))},onUnMask:function(t,e,n){return e?S(n.outputFormat,T(t,n.inputFormat,n),n,!0):e},casing:function(t,e,n,i){return 0==e.nativeDef.indexOf("[ap]")?t.toLowerCase():0==e.nativeDef.indexOf("[AP]")?t.toUpperCase():t},onBeforeMask:function(t,e){return"[object Date]"===Object.prototype.toString.call(t)&&(t=O(t,e)),t},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},3851:function(t,e,n){var i,r=(i=n(2394))&&i.__esModule?i:{default:i},o=n(8711),a=n(4713);r.default.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var s=new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");function l(t,e,n,i,r){return n-1>-1&&"."!==e.buffer[n-1]?(t=e.buffer[n-1]+t,t=n-2>-1&&"."!==e.buffer[n-2]?e.buffer[n-2]+t:"0"+t):t="00"+t,s.test(t)}r.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:l},j:{validator:l},k:{validator:l},l:{validator:l}},onUnMask:function(t,e,n){return t},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(t){var e=t.separator,n=t.quantifier,i="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",r=i;if(e)for(var o=0;o<n;o++)r+="[".concat(e).concat(i,"]");return r},greedy:!1,casing:"lower",separator:null,quantifier:5,skipOptionalPartCharacter:"",onBeforePaste:function(t,e){return(t=t.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9１-９A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(t,e,n){return t},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:"999-99-9999",postValidation:function(t,e,n,i,r,s,l){var u=a.getMaskTemplate.call(this,!0,o.getLastValidPosition.call(this),!0,!0);return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(u.join(""))}}})},207:function(t,e,n){var i=s(n(2394)),r=s(n(7184)),o=n(8711),a=n(2839);function s(t){return t&&t.__esModule?t:{default:t}}var l=i.default.dependencyLib;function u(t,e){for(var n="",r=0;r<t.length;r++)i.default.prototype.definitions[t.charAt(r)]||e.definitions[t.charAt(r)]||e.optionalmarker[0]===t.charAt(r)||e.optionalmarker[1]===t.charAt(r)||e.quantifiermarker[0]===t.charAt(r)||e.quantifiermarker[1]===t.charAt(r)||e.groupmarker[0]===t.charAt(r)||e.groupmarker[1]===t.charAt(r)||e.alternatormarker===t.charAt(r)?n+="\\"+t.charAt(r):n+=t.charAt(r);return n}function c(t,e,n,i){if(t.length>0&&e>0&&(!n.digitsOptional||i)){var r=t.indexOf(n.radixPoint),o=!1;n.negationSymbol.back===t[t.length-1]&&(o=!0,t.length--),-1===r&&(t.push(n.radixPoint),r=t.length-1);for(var a=1;a<=e;a++)isFinite(t[r+a])||(t[r+a]="0")}return o&&t.push(n.negationSymbol.back),t}function h(t,e){var n=0;for(var i in"+"===t&&(n=o.seekNext.call(this,e.validPositions.length-1)),e.tests)if((i=parseInt(i))>=n)for(var r=0,a=e.tests[i].length;r<a;r++)if((void 0===e.validPositions[i]||"-"===t)&&e.tests[i][r].match.def===t)return i+(void 0!==e.validPositions[i]&&"-"!==t?1:0);return n}function d(t,e){for(var n=-1,i=0,r=e.validPositions.length;i<r;i++){var o=e.validPositions[i];if(o&&o.match.def===t){n=i;break}}return n}function f(t,e,n,i,r){var o=e.buffer?e.buffer.indexOf(r.radixPoint):-1,a=(-1!==o||i&&r.jitMasking)&&new RegExp(r.definitions[9].validator).test(t);return r._radixDance&&-1!==o&&a&&null==e.validPositions[o]?{insert:{pos:o===n?o+1:o,c:r.radixPoint},pos:n}:a}i.default.extendAliases({numeric:{mask:function(t){t.repeat=0,t.groupSeparator===t.radixPoint&&t.digits&&"0"!==t.digits&&("."===t.radixPoint?t.groupSeparator=",":","===t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=void 0),t.placeholder.length>1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&(t.positionCaretOnClick="lvp");var e="0",n=t.radixPoint;!0===t.numericInput&&void 0===t.__financeInput?(e="1",t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t._radixDance=!1,n=","===t.radixPoint?"?":"!",""!==t.radixPoint&&void 0===t.definitions[n]&&(t.definitions[n]={},t.definitions[n].validator="["+t.radixPoint+"]",t.definitions[n].placeholder=t.radixPoint,t.definitions[n].static=!0,t.definitions[n].generated=!0)):(t.__financeInput=!1,t.numericInput=!0);var i,o="[+]";if(o+=u(t.prefix,t),""!==t.groupSeparator?(void 0===t.definitions[t.groupSeparator]&&(t.definitions[t.groupSeparator]={},t.definitions[t.groupSeparator].validator="["+t.groupSeparator+"]",t.definitions[t.groupSeparator].placeholder=t.groupSeparator,t.definitions[t.groupSeparator].static=!0,t.definitions[t.groupSeparator].generated=!0),o+=t._mask(t)):o+="9{+}",void 0!==t.digits&&0!==t.digits){var a=t.digits.toString().split(",");isFinite(a[0])&&a[1]&&isFinite(a[1])?o+=n+e+"{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional||t.jitMasking?(i=o+n+e+"{0,"+t.digits+"}",t.keepStatic=!0):o+=n+e+"{"+t.digits+"}")}else t.inputmode="numeric";return o+=u(t.suffix,t),o+="[-]",i&&(o=[i+u(t.suffix,t)+"[-]",o]),t.greedy=!1,function(t){void 0===t.parseMinMaxOptions&&(null!==t.min&&(t.min=t.min.toString().replace(new RegExp((0,r.default)(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.min=t.min.replace(t.radixPoint,".")),t.min=isFinite(t.min)?parseFloat(t.min):NaN,isNaN(t.min)&&(t.min=Number.MIN_VALUE)),null!==t.max&&(t.max=t.max.toString().replace(new RegExp((0,r.default)(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.max=t.max.replace(t.radixPoint,".")),t.max=isFinite(t.max)?parseFloat(t.max):NaN,isNaN(t.max)&&(t.max=Number.MAX_VALUE)),t.parseMinMaxOptions="done")}(t),""!==t.radixPoint&&t.substituteRadixPoint&&(t.substitutes["."==t.radixPoint?",":"."]=t.radixPoint),o},_mask:function(t){return"("+t.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:f},1:{validator:f,definitionSymbol:"9"},9:{validator:"[0-9０-９٠-٩۰-۹]",definitionSymbol:"*"},"+":{validator:function(t,e,n,i,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)}},"-":{validator:function(t,e,n,i,r){return r.allowMinus&&t===r.negationSymbol.back}}},preValidation:function(t,e,n,i,r,o,a,s){if(!1!==r.__financeInput&&n===r.radixPoint)return!1;var l=t.indexOf(r.radixPoint),u=e;if(e=function(t,e,n,i,r){return r._radixDance&&r.numericInput&&e!==r.negationSymbol.back&&t<=n&&(n>0||e==r.radixPoint)&&(void 0===i.validPositions[t-1]||i.validPositions[t-1].input!==r.negationSymbol.back)&&(t-=1),t}(e,n,l,o,r),"-"===n||n===r.negationSymbol.front){if(!0!==r.allowMinus)return!1;var c=!1,f=d("+",o),p=d("-",o);return-1!==f&&(c=[f,p]),!1!==c?{remove:c,caret:u-r.negationSymbol.back.length}:{insert:[{pos:h.call(this,"+",o),c:r.negationSymbol.front,fromIsValid:!0},{pos:h.call(this,"-",o),c:r.negationSymbol.back,fromIsValid:void 0}],caret:u+r.negationSymbol.back.length}}if(n===r.groupSeparator)return{caret:u};if(s)return!0;if(-1!==l&&!0===r._radixDance&&!1===i&&n===r.radixPoint&&void 0!==r.digits&&(isNaN(r.digits)||parseInt(r.digits)>0)&&l!==e)return{caret:r._radixDance&&e===l-1?l+1:l};if(!1===r.__financeInput)if(i){if(r.digitsOptional)return{rewritePosition:a.end};if(!r.digitsOptional){if(a.begin>l&&a.end<=l)return n===r.radixPoint?{insert:{pos:l+1,c:"0",fromIsValid:!0},rewritePosition:l}:{rewritePosition:l+1};if(a.begin<l)return{rewritePosition:a.begin-1}}}else if(!r.showMaskOnHover&&!r.showMaskOnFocus&&!r.digitsOptional&&r.digits>0&&""===this.__valueGet.call(this.el))return{rewritePosition:l};return{rewritePosition:e}},postValidation:function(t,e,n,i,r,o,a){if(!1===i)return i;if(a)return!0;if(null!==r.min||null!==r.max){var s=r.onUnMask(t.slice().reverse().join(""),void 0,l.extend({},r,{unmaskAsNumber:!0}));if(null!==r.min&&s<r.min&&(s.toString().length>r.min.toString().length||s<0))return!1;if(null!==r.max&&s>r.max)return!!r.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:c(r.max.toString().replace(".",r.radixPoint).split(""),r.digits,r).reverse()}}return i},onUnMask:function(t,e,n){if(""===e&&!0===n.nullable)return e;var i=t.replace(n.prefix,"");return i=(i=i.replace(n.suffix,"")).replace(new RegExp((0,r.default)(n.groupSeparator),"g"),""),""!==n.placeholder.charAt(0)&&(i=i.replace(new RegExp(n.placeholder.charAt(0),"g"),"0")),n.unmaskAsNumber?(""!==n.radixPoint&&-1!==i.indexOf(n.radixPoint)&&(i=i.replace(r.default.call(this,n.radixPoint),".")),i=(i=i.replace(new RegExp("^"+(0,r.default)(n.negationSymbol.front)),"-")).replace(new RegExp((0,r.default)(n.negationSymbol.back)+"$"),""),Number(i)):i},isComplete:function(t,e){var n=(e.numericInput?t.slice().reverse():t).join("");return n=(n=(n=(n=(n=n.replace(new RegExp("^"+(0,r.default)(e.negationSymbol.front)),"-")).replace(new RegExp((0,r.default)(e.negationSymbol.back)+"$"),"")).replace(e.prefix,"")).replace(e.suffix,"")).replace(new RegExp((0,r.default)(e.groupSeparator)+"([0-9]{3})","g"),"$1"),","===e.radixPoint&&(n=n.replace((0,r.default)(e.radixPoint),".")),isFinite(n)},onBeforeMask:function(t,e){var n=e.radixPoint||",";isFinite(e.digits)&&(e.digits=parseInt(e.digits)),"number"!=typeof t&&"number"!==e.inputType||""===n||(t=t.toString().replace(".",n));var i="-"===t.charAt(0)||t.charAt(0)===e.negationSymbol.front,o=t.split(n),a=o[0].replace(/[^\-0-9]/g,""),s=o.length>1?o[1].replace(/[^0-9]/g,""):"",l=o.length>1;t=a+(""!==s?n+s:s);var u=0;if(""!==n&&(u=e.digitsOptional?e.digits<s.length?e.digits:s.length:e.digits,""!==s||!e.digitsOptional)){var h=Math.pow(10,u||1);t=t.replace((0,r.default)(n),"."),isNaN(parseFloat(t))||(t=(e.roundingFN(parseFloat(t)*h)/h).toFixed(u)),t=t.toString().replace(".",n)}if(0===e.digits&&-1!==t.indexOf(n)&&(t=t.substring(0,t.indexOf(n))),null!==e.min||null!==e.max){var d=t.toString().replace(n,".");null!==e.min&&d<e.min?t=e.min.toString().replace(".",n):null!==e.max&&d>e.max&&(t=e.max.toString().replace(".",n))}return i&&"-"!==t.charAt(0)&&(t="-"+t),c(t.toString().split(""),u,e,l).join("")},onBeforeWrite:function(t,e,n,i){function o(t,e){if(!1!==i.__financeInput||e){var n=t.indexOf(i.radixPoint);-1!==n&&t.splice(n,1)}if(""!==i.groupSeparator)for(;-1!==(n=t.indexOf(i.groupSeparator));)t.splice(n,1);return t}var a,s;if(i.stripLeadingZeroes&&(s=function(t,e){var n=new RegExp("(^"+(""!==e.negationSymbol.front?(0,r.default)(e.negationSymbol.front)+"?":"")+(0,r.default)(e.prefix)+")(.*)("+(0,r.default)(e.suffix)+(""!=e.negationSymbol.back?(0,r.default)(e.negationSymbol.back)+"?":"")+"$)").exec(t.slice().reverse().join("")),i=n?n[2]:"",o=!1;return i&&(i=i.split(e.radixPoint.charAt(0))[0],o=new RegExp("^[0"+e.groupSeparator+"]*").exec(i)),!(!o||!(o[0].length>1||o[0].length>0&&o[0].length<i.length))&&o}(e,i)))for(var u=e.join("").lastIndexOf(s[0].split("").reverse().join(""))-(s[0]==s.input?0:1),h=s[0]==s.input?1:0,d=s[0].length-h;d>0;d--)delete this.maskset.validPositions[u+d],delete e[u+d];if(t)switch(t.type){case"blur":case"checkval":if(null!==i.min){var f=i.onUnMask(e.slice().reverse().join(""),void 0,l.extend({},i,{unmaskAsNumber:!0}));if(null!==i.min&&f<i.min)return{refreshFromBuffer:!0,buffer:c(i.min.toString().replace(".",i.radixPoint).split(""),i.digits,i).reverse()}}if(e[e.length-1]===i.negationSymbol.front){var p=new RegExp("(^"+(""!=i.negationSymbol.front?(0,r.default)(i.negationSymbol.front)+"?":"")+(0,r.default)(i.prefix)+")(.*)("+(0,r.default)(i.suffix)+(""!=i.negationSymbol.back?(0,r.default)(i.negationSymbol.back)+"?":"")+"$)").exec(o(e.slice(),!0).reverse().join(""));0==(p?p[2]:"")&&(a={refreshFromBuffer:!0,buffer:[0]})}else""!==i.radixPoint&&e.indexOf(i.radixPoint)===i.suffix.length&&(a&&a.buffer?a.buffer.splice(0,1+i.suffix.length):(e.splice(0,1+i.suffix.length),a={refreshFromBuffer:!0,buffer:o(e)}));if(i.enforceDigitsOnBlur){var m=(a=a||{})&&a.buffer||e.slice().reverse();a.refreshFromBuffer=!0,a.buffer=c(m,i.digits,i,!0).reverse()}}return a},onKeyDown:function(t,e,n,i){var r,o=l(this);if(3!=t.location){var s,u=t.key;if((s=i.shortcuts&&i.shortcuts[u])&&s.length>1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(s)),o.trigger("setvalue"),!1}if(t.ctrlKey)switch(t.key){case a.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(i.step)),o.trigger("setvalue"),!1;case a.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(i.step)),o.trigger("setvalue"),!1}if(!t.shiftKey&&(t.key===a.keys.Delete||t.key===a.keys.Backspace||t.key===a.keys.BACKSPACE_SAFARI)&&n.begin!==e.length){if(e[t.key===a.keys.Delete?n.begin-1:n.end]===i.negationSymbol.front)return r=e.slice().reverse(),""!==i.negationSymbol.front&&r.shift(),""!==i.negationSymbol.back&&r.pop(),o.trigger("setvalue",[r.join(""),n.begin]),!1;if(!0===i._radixDance){var h=e.indexOf(i.radixPoint);if(i.digitsOptional){if(0===h)return(r=e.slice().reverse()).pop(),o.trigger("setvalue",[r.join(""),n.begin>=r.length?r.length:n.begin]),!1}else if(-1!==h&&(n.begin<h||n.end<h||t.key===a.keys.Delete&&(n.begin===h||n.begin-1===h))){var d=void 0;return n.begin===n.end&&(t.key===a.keys.Backspace||t.key===a.keys.BACKSPACE_SAFARI?n.begin++:t.key===a.keys.Delete&&n.begin-1===h&&(d=l.extend({},n),n.begin--,n.end--)),(r=e.slice().reverse()).splice(r.length-n.begin,n.begin-n.end+1),r=c(r,i.digits,i).join(""),d&&(n=d),o.trigger("setvalue",[r,n.begin>=r.length?h+1:n.begin]),!1}}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(t){return"("+t.groupSeparator+"99){*|1}("+t.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(t,e,n){var i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=((i=n(8741))&&i.__esModule?i:{default:i}).default?window:{};e.default=r},7760:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.HandleNativePlaceholder=function(t,e){var n=t?t.inputmask:this;if(s.ie){if(t.inputmask._valueGet()!==e&&(t.placeholder!==e||""===t.placeholder)){var i=o.getBuffer.call(n).slice(),r=t.inputmask._valueGet();if(r!==e){var a=o.getLastValidPosition.call(n);-1===a&&r===o.getBufferTemplate.call(n).join("")?i=[]:-1!==a&&c.call(n,i),d(t,i)}}}else t.placeholder!==e&&(t.placeholder=e,""===t.placeholder&&t.removeAttribute("placeholder"))},e.applyInputValue=u,e.checkVal=h,e.clearOptionalTail=c,e.unmaskedvalue=function(t){var e=t?t.inputmask:this,n=e.opts,i=e.maskset;if(t){if(void 0===t.inputmask)return t.value;t.inputmask&&t.inputmask.refreshValue&&u(t,t.inputmask._valueGet(!0))}for(var r=[],a=i.validPositions,s=0,l=a.length;s<l;s++)a[s]&&a[s].match&&(1!=a[s].match.static||Array.isArray(i.metadata)&&!0!==a[s].generatedInput)&&r.push(a[s].input);var c=0===r.length?"":(e.isRTL?r.reverse():r).join("");if("function"==typeof n.onUnMask){var h=(e.isRTL?o.getBuffer.call(e).slice().reverse():o.getBuffer.call(e)).join("");c=n.onUnMask.call(e,h,c,n)}return c},e.writeBuffer=d;var i=n(2839),r=n(4713),o=n(8711),a=n(7215),s=n(9845),l=n(6030);function u(t,e){var n=t?t.inputmask:this,i=n.opts;t.inputmask.refreshValue=!1,"function"==typeof i.onBeforeMask&&(e=i.onBeforeMask.call(n,e,i)||e),h(t,!0,!1,e=(e||"").toString().split("")),n.undoValue=n._valueGet(!0),(i.clearMaskOnLostFocus||i.clearIncomplete)&&t.inputmask._valueGet()===o.getBufferTemplate.call(n).join("")&&-1===o.getLastValidPosition.call(n)&&t.inputmask._valueSet("")}function c(t){t.length=0;for(var e,n=r.getMaskTemplate.call(this,!0,0,!0,void 0,!0);void 0!==(e=n.shift());)t.push(e);return t}function h(t,e,n,i,s){var u=t?t.inputmask:this,c=u.maskset,h=u.opts,f=u.dependencyLib,p=i.slice(),m="",g=-1,v=void 0,y=h.skipOptionalPartCharacter;h.skipOptionalPartCharacter="",o.resetMaskSet.call(u),c.tests={},g=h.radixPoint?o.determineNewCaretPosition.call(u,{begin:0,end:0},!1,!1===h.__financeInput?"radixFocus":void 0).begin:0,c.p=g,u.caretPos={begin:g};var b=[],_=u.caretPos;if(p.forEach((function(t,e){if(void 0!==t){var i=new f.Event("_checkval");i.key=t,m+=t;var a=o.getLastValidPosition.call(u,void 0,!0);!function(t,e){for(var n=r.getMaskTemplate.call(u,!0,0).slice(t,o.seekNext.call(u,t,!1,!1)).join("").replace(/'/g,""),i=n.indexOf(e);i>0&&" "===n[i-1];)i--;var a=0===i&&!o.isMask.call(u,t)&&(r.getTest.call(u,t).match.nativeDef===e.charAt(0)||!0===r.getTest.call(u,t).match.static&&r.getTest.call(u,t).match.nativeDef==="'"+e.charAt(0)||" "===r.getTest.call(u,t).match.nativeDef&&(r.getTest.call(u,t+1).match.nativeDef===e.charAt(0)||!0===r.getTest.call(u,t+1).match.static&&r.getTest.call(u,t+1).match.nativeDef==="'"+e.charAt(0)));if(!a&&i>0&&!o.isMask.call(u,t,!1,!0)){var s=o.seekNext.call(u,t);u.caretPos.begin<s&&(u.caretPos={begin:s})}return a}(g,m)?(v=l.EventHandlers.keypressEvent.call(u,i,!0,!1,n,u.caretPos.begin))&&(g=u.caretPos.begin+1,m=""):v=l.EventHandlers.keypressEvent.call(u,i,!0,!1,n,a+1),v?(void 0!==v.pos&&c.validPositions[v.pos]&&!0===c.validPositions[v.pos].match.static&&void 0===c.validPositions[v.pos].alternation&&(b.push(v.pos),u.isRTL||(v.forwardPosition=v.pos+1)),d.call(u,void 0,o.getBuffer.call(u),v.forwardPosition,i,!1),u.caretPos={begin:v.forwardPosition,end:v.forwardPosition},_=u.caretPos):void 0===c.validPositions[e]&&p[e]===r.getPlaceholder.call(u,e)&&o.isMask.call(u,e,!0)?u.caretPos.begin++:u.caretPos=_}})),b.length>0){var w,x,k=o.seekNext.call(u,-1,void 0,!1);if(!a.isComplete.call(u,o.getBuffer.call(u))&&b.length<=k||a.isComplete.call(u,o.getBuffer.call(u))&&b.length>0&&b.length!==k&&0===b[0])for(var S=k;void 0!==(w=b.shift());){var C=new f.Event("_checkval");if((x=c.validPositions[w]).generatedInput=!0,C.key=x.input,(v=l.EventHandlers.keypressEvent.call(u,C,!0,!1,n,S))&&void 0!==v.pos&&v.pos!==w&&c.validPositions[v.pos]&&!0===c.validPositions[v.pos].match.static)b.push(v.pos);else if(!v)break;S++}}e&&d.call(u,t,o.getBuffer.call(u),v?v.forwardPosition:u.caretPos.begin,s||new f.Event("checkval"),s&&("input"===s.type&&u.undoValue!==o.getBuffer.call(u).join("")||"paste"===s.type)),h.skipOptionalPartCharacter=y}function d(t,e,n,r,s){var l=t?t.inputmask:this,u=l.opts,c=l.dependencyLib;if(r&&"function"==typeof u.onBeforeWrite){var h=u.onBeforeWrite.call(l,r,e,n,u);if(h){if(h.refreshFromBuffer){var d=h.refreshFromBuffer;a.refreshFromBuffer.call(l,!0===d?d:d.start,d.end,h.buffer||e),e=o.getBuffer.call(l,!0)}void 0!==n&&(n=void 0!==h.caret?h.caret:n)}}if(void 0!==t&&(t.inputmask._valueSet(e.join("")),void 0===n||void 0!==r&&"blur"===r.type||o.caret.call(l,t,n,void 0,void 0,void 0!==r&&"keydown"===r.type&&(r.key===i.keys.Delete||r.key===i.keys.Backspace)),!0===s)){var f=c(t),p=t.inputmask._valueGet();t.inputmask.skipInputEvent=!0,f.trigger("input"),setTimeout((function(){p===o.getBufferTemplate.call(l).join("")?f.trigger("cleared"):!0===a.isComplete.call(l,e)&&f.trigger("complete")}),0)}}},2394:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(157),r=g(n(4963)),o=g(n(9380)),a=n(2391),s=n(4713),l=n(8711),u=n(7215),c=n(7760),h=n(9716),d=g(n(7392)),f=g(n(3976)),p=g(n(8741));function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t){return t&&t.__esModule?t:{default:t}}var v=o.default.document,y="_inputmask_opts";function b(t,e,n){if(p.default){if(!(this instanceof b))return new b(t,e,n);this.dependencyLib=r.default,this.el=void 0,this.events={},this.maskset=void 0,!0!==n&&("[object Object]"===Object.prototype.toString.call(t)?e=t:(e=e||{},t&&(e.alias=t)),this.opts=r.default.extend(!0,{},this.defaults,e),this.noMasksCache=e&&void 0!==e.definitions,this.userOptions=e||{},_(this.opts.alias,e,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}}function _(t,e,n){var i=b.prototype.aliases[t];return i?(i.alias&&_(i.alias,void 0,n),r.default.extend(!0,n,i),r.default.extend(!0,n,e),!0):(null===n.mask&&(n.mask=t),!1)}b.prototype={dataAttribute:"data-inputmask",defaults:f.default,definitions:d.default,aliases:{},masksCache:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(t){var e=this;return"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:Array.isArray(t)?t:[].slice.call(t)).forEach((function(t,n){var s=r.default.extend(!0,{},e.opts);if(function(t,e,n,i){function a(e,r){var a=""===i?e:i+"-"+e;null!==(r=void 0!==r?r:t.getAttribute(a))&&("string"==typeof r&&(0===e.indexOf("on")?r=o.default[r]:"false"===r?r=!1:"true"===r&&(r=!0)),n[e]=r)}if(!0===e.importDataAttributes){var s,l,u,c,h=t.getAttribute(i);if(h&&""!==h&&(h=h.replace(/'/g,'"'),l=JSON.parse("{"+h+"}")),l)for(c in u=void 0,l)if("alias"===c.toLowerCase()){u=l[c];break}for(s in a("alias",u),n.alias&&_(n.alias,n,e),e){if(l)for(c in u=void 0,l)if(c.toLowerCase()===s.toLowerCase()){u=l[c];break}a(s,u)}}return r.default.extend(!0,e,n),("rtl"===t.dir||e.rightAlign)&&(t.style.textAlign="right"),("rtl"===t.dir||e.numericInput)&&(t.dir="ltr",t.removeAttribute("dir"),e.isRTL=!0),Object.keys(n).length}(t,s,r.default.extend(!0,{},e.userOptions),e.dataAttribute)){var l=(0,a.generateMaskSet)(s,e.noMasksCache);void 0!==l&&(void 0!==t.inputmask&&(t.inputmask.opts.autoUnmask=!0,t.inputmask.remove()),t.inputmask=new b(void 0,void 0,!0),t.inputmask.opts=s,t.inputmask.noMasksCache=e.noMasksCache,t.inputmask.userOptions=r.default.extend(!0,{},e.userOptions),t.inputmask.el=t,t.inputmask.$el=(0,r.default)(t),t.inputmask.maskset=l,r.default.data(t,y,e.userOptions),i.mask.call(t.inputmask))}})),t&&t[0]&&t[0].inputmask||this},option:function(t,e){return"string"==typeof t?this.opts[t]:"object"===m(t)?(r.default.extend(this.userOptions,t),this.el&&!0!==e&&this.mask(this.el),this):void 0},unmaskedvalue:function(t){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),void 0===this.el||void 0!==t){var e=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!1,!1,e),"function"==typeof this.opts.onBeforeWrite&&this.opts.onBeforeWrite.call(this,void 0,l.getBuffer.call(this),0,this.opts)}return c.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){r.default.data(this.el,y,null);var t=this.opts.autoUnmask?(0,c.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);t!==l.getBufferTemplate.call(this).join("")?this._valueSet(t,this.opts.autoUnmask):this._valueSet(""),h.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):v.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?l.getBufferTemplate.call(this).reverse():l.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),u.isComplete.call(this,l.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var t=s.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach((function(e){return e.mask!==t||(t=e,!1)})),t}return this.maskset.metadata},isValid:function(t){if(this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache),t){var e=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!0,!1,e)}else t=this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join("");for(var n=l.getBuffer.call(this),i=l.determineLastRequiredPosition.call(this),r=n.length-1;r>i&&!l.isMask.call(this,r);r--);return n.splice(i,r+1-i),u.isComplete.call(this,n)&&t===(this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join(""))},format:function(t,e){this.maskset=this.maskset||(0,a.generateMaskSet)(this.opts,this.noMasksCache);var n=("function"==typeof this.opts.onBeforeMask&&this.opts.onBeforeMask.call(this,t,this.opts)||t).split("");c.checkVal.call(this,void 0,!0,!1,n);var i=this.isRTL?l.getBuffer.call(this).slice().reverse().join(""):l.getBuffer.call(this).join("");return e?{value:i,metadata:this.getmetadata()}:i},setValue:function(t){this.el&&(0,r.default)(this.el).trigger("setvalue",[t])},analyseMask:a.analyseMask},b.extendDefaults=function(t){r.default.extend(!0,b.prototype.defaults,t)},b.extendDefinitions=function(t){r.default.extend(!0,b.prototype.definitions,t)},b.extendAliases=function(t){r.default.extend(!0,b.prototype.aliases,t)},b.format=function(t,e,n){return b(e).format(t,n)},b.unmask=function(t,e){return b(e).unmaskedvalue(t)},b.isValid=function(t,e){return b(e).isValid(t)},b.remove=function(t){"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:t).forEach((function(t){t.inputmask&&t.inputmask.remove()}))},b.setValue=function(t,e){"string"==typeof t&&(t=v.getElementById(t)||v.querySelectorAll(t)),(t=t.nodeName?[t]:t).forEach((function(t){t.inputmask?t.inputmask.setValue(e):(0,r.default)(t).trigger("setvalue",[e])}))},b.dependencyLib=r.default,o.default.Inputmask=b;var w=b;e.default=w},5296:function(t,e,n){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var r=p(n(9380)),o=p(n(2394)),a=p(n(8741));function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=void 0,o=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(r.key,"string"),"symbol"===i(o)?o:String(o)),r)}var o}function l(t){var e=h();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function u(t){var e="function"==typeof Map?new Map:void 0;return u=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return c(t,arguments,f(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),d(i,t)},u(t)}function c(t,e,n){return c=h()?Reflect.construct.bind():function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&d(r,n.prototype),r},c.apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t){return t&&t.__esModule?t:{default:t}}var m=r.default.document;if(a.default&&m&&m.head&&m.head.attachShadow&&r.default.customElements&&void 0===r.default.customElements.get("input-mask")){var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(a,t);var e,n,i,r=l(a);function a(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var e=(t=r.call(this)).getAttributeNames(),n=t.attachShadow({mode:"closed"}),i=m.createElement("input");for(var s in i.type="text",n.appendChild(i),e)Object.prototype.hasOwnProperty.call(e,s)&&i.setAttribute(e[s],t.getAttribute(e[s]));var l=new o.default;return l.dataAttribute="",l.mask(i),i.inputmask.shadowRoot=n,t}return e=a,n&&s(e.prototype,n),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(u(HTMLElement));r.default.customElements.define("input-mask",g)}},2839:function(t,e){function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}Object.defineProperty(e,"__esModule",{value:!0}),e.keys=e.keyCode=void 0,e.toKey=function(t,e){return o[t]||(e?String.fromCharCode(t):String.fromCharCode(t).toLowerCase())},e.toKeyCode=function(t){return r[t]};var r={AltGraph:18,ArrowDown:40,ArrowLeft:37,ArrowRight:39,ArrowUp:38,Backspace:8,BACKSPACE_SAFARI:127,CapsLock:20,Delete:46,End:35,Enter:13,Escape:27,Home:36,Insert:45,PageDown:34,PageUp:33,Space:32,Tab:9,c:67,x:88,z:90,Shift:16,Control:17,Alt:18,Pause:19,Meta_LEFT:91,Meta_RIGHT:92,ContextMenu:93,Process:229,Unidentified:229,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123};e.keyCode=r;var o=Object.entries(r).reduce((function(t,e){var i=n(e,2),r=i[0],o=i[1];return t[o]=void 0===t[o]?r:t[o],t}),{}),a=Object.entries(r).reduce((function(t,e){var i=n(e,2),r=i[0];return i[1],t[r]="Space"===r?" ":r,t}),{});e.keys=a},2391:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.analyseMask=function(t,e,n){var i,a,s,l,u,c,h=/(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g,d=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,f=!1,p=new r.default,m=[],g=[],v=!1;function y(t,i,r){r=void 0!==r?r:t.matches.length;var a=t.matches[r-1];if(e){if(0===i.indexOf("[")||f&&/\\d|\\s|\\w|\\p/i.test(i)||"."===i){var s=n.casing?"i":"";/^\\p\{.*}$/i.test(i)&&(s+="u"),t.matches.splice(r++,0,{fn:new RegExp(i,s),static:!1,optionality:!1,newBlockMarker:void 0===a?"master":a.def!==i,casing:null,def:i,placeholder:void 0,nativeDef:i})}else f&&(i=i[i.length-1]),i.split("").forEach((function(e,i){a=t.matches[r-1],t.matches.splice(r++,0,{fn:/[a-z]/i.test(n.staticDefinitionSymbol||e)?new RegExp("["+(n.staticDefinitionSymbol||e)+"]",n.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:void 0===a?"master":a.def!==e&&!0!==a.static,casing:null,def:n.staticDefinitionSymbol||e,placeholder:void 0!==n.staticDefinitionSymbol?e:void 0,nativeDef:(f?"'":"")+e})}));f=!1}else{var l=n.definitions&&n.definitions[i]||n.usePrototypeDefinitions&&o.default.prototype.definitions[i];l&&!f?t.matches.splice(r++,0,{fn:l.validator?"string"==typeof l.validator?new RegExp(l.validator,n.casing?"i":""):new function(){this.test=l.validator}:new RegExp("."),static:l.static||!1,optionality:l.optional||!1,defOptionality:l.optional||!1,newBlockMarker:void 0===a||l.optional?"master":a.def!==(l.definitionSymbol||i),casing:l.casing,def:l.definitionSymbol||i,placeholder:l.placeholder,nativeDef:i,generated:l.generated}):(t.matches.splice(r++,0,{fn:/[a-z]/i.test(n.staticDefinitionSymbol||i)?new RegExp("["+(n.staticDefinitionSymbol||i)+"]",n.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:void 0===a?"master":a.def!==i&&!0!==a.static,casing:null,def:n.staticDefinitionSymbol||i,placeholder:void 0!==n.staticDefinitionSymbol?i:void 0,nativeDef:(f?"'":"")+i}),f=!1)}}function b(){if(m.length>0){if(y(l=m[m.length-1],a),l.isAlternator){u=m.pop();for(var t=0;t<u.matches.length;t++)u.matches[t].isGroup&&(u.matches[t].isGroup=!1);m.length>0?(l=m[m.length-1]).matches.push(u):p.matches.push(u)}}else y(p,a)}function _(t){var e=new r.default(!0);return e.openGroup=!1,e.matches=t,e}function w(){if((s=m.pop()).openGroup=!1,void 0!==s)if(m.length>0){if((l=m[m.length-1]).matches.push(s),l.isAlternator){for(var t=(u=m.pop()).matches[0].matches?u.matches[0].matches.length:1,e=0;e<u.matches.length;e++)u.matches[e].isGroup=!1,u.matches[e].alternatorGroup=!1,null===n.keepStatic&&t<(u.matches[e].matches?u.matches[e].matches.length:1)&&(n.keepStatic=!0),t=u.matches[e].matches?u.matches[e].matches.length:1;m.length>0?(l=m[m.length-1]).matches.push(u):p.matches.push(u)}}else p.matches.push(s);else b()}function x(t){var e=t.pop();return e.isQuantifier&&(e=_([t.pop(),e])),e}for(e&&(n.optionalmarker[0]=void 0,n.optionalmarker[1]=void 0);i=e?d.exec(t):h.exec(t);){if(a=i[0],e){switch(a.charAt(0)){case"?":a="{0,1}";break;case"+":case"*":a="{"+a+"}";break;case"|":if(0===m.length){var k=_(p.matches);k.openGroup=!0,m.push(k),p.matches=[],v=!0}}switch(a){case"\\d":a="[0-9]";break;case"\\p":a+=d.exec(t)[0],a+=d.exec(t)[0]}}if(f)b();else switch(a.charAt(0)){case"$":case"^":e||b();break;case n.escapeChar:f=!0,e&&b();break;case n.optionalmarker[1]:case n.groupmarker[1]:w();break;case n.optionalmarker[0]:m.push(new r.default(!1,!0));break;case n.groupmarker[0]:m.push(new r.default(!0));break;case n.quantifiermarker[0]:var S=new r.default(!1,!1,!0),C=(a=a.replace(/[{}?]/g,"")).split("|"),T=C[0].split(","),O=isNaN(T[0])?T[0]:parseInt(T[0]),E=1===T.length?O:isNaN(T[1])?T[1]:parseInt(T[1]),A=isNaN(C[1])?C[1]:parseInt(C[1]);"*"!==O&&"+"!==O||(O="*"===E?0:1),S.quantifier={min:O,max:E,jit:A};var L=m.length>0?m[m.length-1].matches:p.matches;(i=L.pop()).isGroup||(i=_([i])),L.push(i),L.push(S);break;case n.alternatormarker:if(m.length>0){var M=(l=m[m.length-1]).matches[l.matches.length-1];c=l.openGroup&&(void 0===M.matches||!1===M.isGroup&&!1===M.isAlternator)?m.pop():x(l.matches)}else c=x(p.matches);if(c.isAlternator)m.push(c);else if(c.alternatorGroup?(u=m.pop(),c.alternatorGroup=!1):u=new r.default(!1,!1,!1,!0),u.matches.push(c),m.push(u),c.openGroup){c.openGroup=!1;var P=new r.default(!0);P.alternatorGroup=!0,m.push(P)}break;default:b()}}for(v&&w();m.length>0;)s=m.pop(),p.matches.push(s);return p.matches.length>0&&(function t(i){i&&i.matches&&i.matches.forEach((function(r,o){var a=i.matches[o+1];(void 0===a||void 0===a.matches||!1===a.isQuantifier)&&r&&r.isGroup&&(r.isGroup=!1,e||(y(r,n.groupmarker[0],0),!0!==r.openGroup&&y(r,n.groupmarker[1]))),t(r)}))}(p),g.push(p)),(n.numericInput||n.isRTL)&&function t(e){for(var i in e.matches=e.matches.reverse(),e.matches)if(Object.prototype.hasOwnProperty.call(e.matches,i)){var r=parseInt(i);if(e.matches[i].isQuantifier&&e.matches[r+1]&&e.matches[r+1].isGroup){var o=e.matches[i];e.matches.splice(i,1),e.matches.splice(r+1,0,o)}void 0!==e.matches[i].matches?e.matches[i]=t(e.matches[i]):e.matches[i]=((a=e.matches[i])===n.optionalmarker[0]?a=n.optionalmarker[1]:a===n.optionalmarker[1]?a=n.optionalmarker[0]:a===n.groupmarker[0]?a=n.groupmarker[1]:a===n.groupmarker[1]&&(a=n.groupmarker[0]),a)}var a;return e}(g[0]),g},e.generateMaskSet=function(t,e){var n;function r(t,e){var n=e.repeat,i=e.groupmarker,r=e.quantifiermarker,o=e.keepStatic;if(n>0||"*"===n||"+"===n){var l="*"===n?0:"+"===n?1:n;t=i[0]+t+i[1]+r[0]+l+","+n+r[1]}if(!0===o){var u=t.match(new RegExp("(.)\\[([^\\]]*)\\]","g"));u&&u.forEach((function(e,n){var i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split("["),2),r=i[0],o=i[1];o=o.replace("]",""),t=t.replace(new RegExp("".concat((0,a.default)(r),"\\[").concat((0,a.default)(o),"\\]")),r.charAt(0)===o.charAt(0)?"(".concat(r,"|").concat(r).concat(o,")"):"".concat(r,"[").concat(o,"]"))}))}return t}function l(t,n,a){var s,l,u=!1;return null!==t&&""!==t||((u=null!==a.regex)?t=(t=a.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(u=!0,t=".*")),1===t.length&&!1===a.greedy&&0!==a.repeat&&(a.placeholder=""),t=r(t,a),l=u?"regex_"+a.regex:a.numericInput?t.split("").reverse().join(""):t,null!==a.keepStatic&&(l="ks_"+a.keepStatic+l),void 0===o.default.prototype.masksCache[l]||!0===e?(s={mask:t,maskToken:o.default.prototype.analyseMask(t,u,a),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:n,maskLength:void 0,jitOffset:{}},!0!==e&&(o.default.prototype.masksCache[l]=s,s=i.default.extend(!0,{},o.default.prototype.masksCache[l]))):s=i.default.extend(!0,{},o.default.prototype.masksCache[l]),s}if("function"==typeof t.mask&&(t.mask=t.mask(t)),Array.isArray(t.mask)){if(t.mask.length>1){null===t.keepStatic&&(t.keepStatic=!0);var u=t.groupmarker[0];return(t.isRTL?t.mask.reverse():t.mask).forEach((function(e){u.length>1&&(u+=t.alternatormarker),void 0!==e.mask&&"function"!=typeof e.mask?u+=e.mask:u+=e})),l(u+=t.groupmarker[1],t.mask,t)}t.mask=t.mask.pop()}return n=t.mask&&void 0!==t.mask.mask&&"function"!=typeof t.mask.mask?l(t.mask.mask,t.mask,t):l(t.mask,t.mask,t),null===t.keepStatic&&(t.keepStatic=!1),n};var i=l(n(4963)),r=l(n(9695)),o=l(n(2394)),a=l(n(7184));function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function l(t){return t&&t.__esModule?t:{default:t}}},157:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.mask=function(){var t=this,e=this.opts,n=this.el,c=this.dependencyLib;a.EventRuler.off(n);var h=function(e,n){"textarea"!==e.tagName.toLowerCase()&&n.ignorables.push(i.keys.Enter);var s=e.getAttribute("type"),l="input"===e.tagName.toLowerCase()&&n.supportsInputType.includes(s)||e.isContentEditable||"textarea"===e.tagName.toLowerCase();if(!l)if("input"===e.tagName.toLowerCase()){var u=document.createElement("input");u.setAttribute("type",s),l="text"===u.type,u=null}else l="partial";return!1!==l?function(e){var i,s;function l(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==r.getLastValidPosition.call(t)||!0!==n.nullable?(this.inputmask.shadowRoot||this.ownerDocument).activeElement===this&&n.clearMaskOnLostFocus?(t.isRTL?o.clearOptionalTail.call(t,r.getBuffer.call(t).slice()).reverse():o.clearOptionalTail.call(t,r.getBuffer.call(t).slice())).join(""):i.call(this):"":i.call(this)}function u(t){s.call(this,t),this.inputmask&&(0,o.applyInputValue)(this,t)}if(!e.inputmask.__valueGet){if(!0!==n.noValuePatching){if(Object.getOwnPropertyDescriptor){var h=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"):void 0;h&&h.get&&h.set?(i=h.get,s=h.set,Object.defineProperty(e,"value",{get:l,set:u,configurable:!0})):"input"!==e.tagName.toLowerCase()&&(i=function(){return this.textContent},s=function(t){this.textContent=t},Object.defineProperty(e,"value",{get:l,set:u,configurable:!0}))}else document.__lookupGetter__&&e.__lookupGetter__("value")&&(i=e.__lookupGetter__("value"),s=e.__lookupSetter__("value"),e.__defineGetter__("value",l),e.__defineSetter__("value",u));e.inputmask.__valueGet=i,e.inputmask.__valueSet=s}e.inputmask._valueGet=function(e){return t.isRTL&&!0!==e?i.call(this.el).split("").reverse().join(""):i.call(this.el)},e.inputmask._valueSet=function(e,n){s.call(this.el,null==e?"":!0!==n&&t.isRTL?e.split("").reverse().join(""):e)},void 0===i&&(i=function(){return this.value},s=function(t){this.value=t},function(e){if(c.valHooks&&(void 0===c.valHooks[e]||!0!==c.valHooks[e].inputmaskpatch)){var i=c.valHooks[e]&&c.valHooks[e].get?c.valHooks[e].get:function(t){return t.value},a=c.valHooks[e]&&c.valHooks[e].set?c.valHooks[e].set:function(t,e){return t.value=e,t};c.valHooks[e]={get:function(e){if(e.inputmask){if(e.inputmask.opts.autoUnmask)return e.inputmask.unmaskedvalue();var o=i(e);return-1!==r.getLastValidPosition.call(t,void 0,void 0,e.inputmask.maskset.validPositions)||!0!==n.nullable?o:""}return i(e)},set:function(t,e){var n=a(t,e);return t.inputmask&&(0,o.applyInputValue)(t,e),n},inputmaskpatch:!0}}}(e.type),function(t){a.EventRuler.on(t,"mouseenter",(function(){var t=this,e=t.inputmask._valueGet(!0);e!=(t.inputmask.isRTL?r.getBuffer.call(t.inputmask).slice().reverse():r.getBuffer.call(t.inputmask)).join("")&&(0,o.applyInputValue)(t,e)}))}(e))}}(e):e.inputmask=void 0,l}(n,e);if(!1!==h){t.originalPlaceholder=n.placeholder,t.maxLength=void 0!==n?n.maxLength:void 0,-1===t.maxLength&&(t.maxLength=void 0),"inputMode"in n&&null===n.getAttribute("inputmode")&&(n.inputMode=e.inputmode,n.setAttribute("inputmode",e.inputmode)),!0===h&&(e.showMaskOnFocus=e.showMaskOnFocus&&-1===["cc-number","cc-exp"].indexOf(n.autocomplete),s.iphone&&(e.insertModeVisual=!1,n.setAttribute("autocorrect","off")),a.EventRuler.on(n,"submit",u.EventHandlers.submitEvent),a.EventRuler.on(n,"reset",u.EventHandlers.resetEvent),a.EventRuler.on(n,"blur",u.EventHandlers.blurEvent),a.EventRuler.on(n,"focus",u.EventHandlers.focusEvent),a.EventRuler.on(n,"invalid",u.EventHandlers.invalidEvent),a.EventRuler.on(n,"click",u.EventHandlers.clickEvent),a.EventRuler.on(n,"mouseleave",u.EventHandlers.mouseleaveEvent),a.EventRuler.on(n,"mouseenter",u.EventHandlers.mouseenterEvent),a.EventRuler.on(n,"paste",u.EventHandlers.pasteEvent),a.EventRuler.on(n,"cut",u.EventHandlers.cutEvent),a.EventRuler.on(n,"complete",e.oncomplete),a.EventRuler.on(n,"incomplete",e.onincomplete),a.EventRuler.on(n,"cleared",e.oncleared),!0!==e.inputEventOnly&&a.EventRuler.on(n,"keydown",u.EventHandlers.keyEvent),(s.mobile||e.inputEventOnly)&&n.removeAttribute("maxLength"),a.EventRuler.on(n,"input",u.EventHandlers.inputFallBackEvent)),a.EventRuler.on(n,"setvalue",u.EventHandlers.setValueEvent),r.getBufferTemplate.call(t).join(""),t.undoValue=t._valueGet(!0);var d=(n.inputmask.shadowRoot||n.ownerDocument).activeElement;if(""!==n.inputmask._valueGet(!0)||!1===e.clearMaskOnLostFocus||d===n){(0,o.applyInputValue)(n,n.inputmask._valueGet(!0),e);var f=r.getBuffer.call(t).slice();!1===l.isComplete.call(t,f)&&e.clearIncomplete&&r.resetMaskSet.call(t),e.clearMaskOnLostFocus&&d!==n&&(-1===r.getLastValidPosition.call(t)?f=[]:o.clearOptionalTail.call(t,f)),(!1===e.clearMaskOnLostFocus||e.showMaskOnFocus&&d===n||""!==n.inputmask._valueGet(!0))&&(0,o.writeBuffer)(n,f),d===n&&r.caret.call(t,n,r.seekNext.call(t,r.getLastValidPosition.call(t)))}}};var i=n(2839),r=n(8711),o=n(7760),a=n(9716),s=n(9845),l=n(7215),u=n(6030)},9695:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,i){this.matches=[],this.openGroup=t||!1,this.alternatorGroup=!1,this.isGroup=t||!1,this.isOptional=e||!1,this.isQuantifier=n||!1,this.isAlternator=i||!1,this.quantifier={min:1,max:1}}},3194:function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),i=n.length>>>0;if(0===i)return!1;for(var r=0|e,o=Math.max(r>=0?r:i-Math.abs(r),0);o<i;){if(n[o]===t)return!0;o++}return!1}})},9302:function(){var t=Function.bind.call(Function.call,Array.prototype.reduce),e=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),n=Function.bind.call(Function.call,Array.prototype.concat),i=Object.keys;Object.entries||(Object.entries=function(r){return t(i(r),(function(t,i){return n(t,"string"==typeof i&&e(r,i)?[[i,r[i]]]:[])}),[])})},7149:function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===t("test".__proto__)?function(t){return t.__proto__}:function(t){return t.constructor.prototype})},4013:function(){String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)})},8711:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.caret=function(t,e,n,i,r){var o,a=this,s=this.opts;if(void 0===e)return"selectionStart"in t&&"selectionEnd"in t?(e=t.selectionStart,n=t.selectionEnd):window.getSelection?(o=window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==t&&o.commonAncestorContainer!==t||(e=o.startOffset,n=o.endOffset):document.selection&&document.selection.createRange&&(n=(e=0-(o=document.selection.createRange()).duplicate().moveStart("character",-t.inputmask._valueGet().length))+o.text.length),{begin:i?e:u.call(a,e),end:i?n:u.call(a,n)};if(Array.isArray(e)&&(n=a.isRTL?e[0]:e[1],e=a.isRTL?e[1]:e[0]),void 0!==e.begin&&(n=a.isRTL?e.begin:e.end,e=a.isRTL?e.end:e.begin),"number"==typeof e){e=i?e:u.call(a,e),n="number"==typeof(n=i?n:u.call(a,n))?n:e;var l=parseInt(((t.ownerDocument.defaultView||window).getComputedStyle?(t.ownerDocument.defaultView||window).getComputedStyle(t,null):t.currentStyle).fontSize)*n;if(t.scrollLeft=l>t.scrollWidth?l:0,t.inputmask.caretPos={begin:e,end:n},s.insertModeVisual&&!1===s.insertMode&&e===n&&(r||n++),t===(t.inputmask.shadowRoot||t.ownerDocument).activeElement)if("setSelectionRange"in t)t.setSelectionRange(e,n);else if(window.getSelection){if(o=document.createRange(),void 0===t.firstChild||null===t.firstChild){var c=document.createTextNode("");t.appendChild(c)}o.setStart(t.firstChild,e<t.inputmask._valueGet().length?e:t.inputmask._valueGet().length),o.setEnd(t.firstChild,n<t.inputmask._valueGet().length?n:t.inputmask._valueGet().length),o.collapse(!0);var h=window.getSelection();h.removeAllRanges(),h.addRange(o)}else t.createTextRange&&((o=t.createTextRange()).collapse(!0),o.moveEnd("character",n),o.moveStart("character",e),o.select())}},e.determineLastRequiredPosition=function(t){var e,n,o=this,s=o.maskset,l=o.dependencyLib,u=i.getMaskTemplate.call(o,!0,a.call(o),!0,!0),c=u.length,h=a.call(o),d={},f=s.validPositions[h],p=void 0!==f?f.locator.slice():void 0;for(e=h+1;e<u.length;e++)p=(n=i.getTestTemplate.call(o,e,p,e-1)).locator.slice(),d[e]=l.extend(!0,{},n);var m=f&&void 0!==f.alternation?f.locator[f.alternation]:void 0;for(e=c-1;e>h&&((n=d[e]).match.optionality||n.match.optionalQuantifier&&n.match.newBlockMarker||m&&(m!==d[e].locator[f.alternation]&&1!=n.match.static||!0===n.match.static&&n.locator[f.alternation]&&r.checkAlternationMatch.call(o,n.locator[f.alternation].toString().split(","),m.toString().split(","))&&""!==i.getTests.call(o,e)[0].def))&&u[e]===i.getPlaceholder.call(o,e,n.match);e--)c--;return t?{l:c,def:d[c]?d[c].match:void 0}:c},e.determineNewCaretPosition=function(t,e,n){var r=this,u=r.maskset,c=r.opts;if(e&&(r.isRTL?t.end=t.begin:t.begin=t.end),t.begin===t.end){switch(n=n||c.positionCaretOnClick){case"none":break;case"select":t={begin:0,end:o.call(r).length};break;case"ignore":t.end=t.begin=l.call(r,a.call(r));break;case"radixFocus":if(r.clicked>1&&0==u.validPositions.length)break;if(function(t){if(""!==c.radixPoint&&0!==c.digits){var e=u.validPositions;if(void 0===e[t]||e[t].input===i.getPlaceholder.call(r,t)){if(t<l.call(r,-1))return!0;var n=o.call(r).indexOf(c.radixPoint);if(-1!==n){for(var a=0,s=e.length;a<s;a++)if(e[a]&&n<a&&e[a].input!==i.getPlaceholder.call(r,a))return!1;return!0}}}return!1}(t.begin)){var h=o.call(r).join("").indexOf(c.radixPoint);t.end=t.begin=c.numericInput?l.call(r,h):h;break}default:var d=t.begin,f=a.call(r,d,!0),p=l.call(r,-1!==f||s.call(r,0)?f:-1);if(d<=p)t.end=t.begin=s.call(r,d,!1,!0)?d:l.call(r,d);else{var m=u.validPositions[f],g=i.getTestTemplate.call(r,p,m?m.match.locator:void 0,m),v=i.getPlaceholder.call(r,p,g.match);if(""!==v&&o.call(r)[p]!==v&&!0!==g.match.optionalQuantifier&&!0!==g.match.newBlockMarker||!s.call(r,p,c.keepStatic,!0)&&g.match.def===v){var y=l.call(r,p);(d>=y||d===p)&&(p=y)}t.end=t.begin=p}}return t}},e.getBuffer=o,e.getBufferTemplate=function(){var t=this.maskset;return void 0===t._buffer&&(t._buffer=i.getMaskTemplate.call(this,!1,1),void 0===t.buffer&&(t.buffer=t._buffer.slice())),t._buffer},e.getLastValidPosition=a,e.isMask=s,e.resetMaskSet=function(t){var e=this.maskset;e.buffer=void 0,!0!==t&&(e.validPositions=[],e.p=0)},e.seekNext=l,e.seekPrevious=function(t,e){var n=this,r=t-1;if(t<=0)return 0;for(;r>0&&(!0===e&&(!0!==i.getTest.call(n,r).match.newBlockMarker||!s.call(n,r,void 0,!0))||!0!==e&&!s.call(n,r,void 0,!0));)r--;return r},e.translatePosition=u;var i=n(4713),r=n(7215);function o(t){var e=this,n=e.maskset;return void 0!==n.buffer&&!0!==t||(n.buffer=i.getMaskTemplate.call(e,!0,a.call(e),!0),void 0===n._buffer&&(n._buffer=n.buffer.slice())),n.buffer}function a(t,e,n){var i=this.maskset,r=-1,o=-1,a=n||i.validPositions;void 0===t&&(t=-1);for(var s=0,l=a.length;s<l;s++)a[s]&&(e||!0!==a[s].generatedInput)&&(s<=t&&(r=s),s>=t&&(o=s));return-1===r||r==t?o:-1==o||t-r<o-t?r:o}function s(t,e,n){var r=this,o=this.maskset,a=i.getTestTemplate.call(r,t).match;if(""===a.def&&(a=i.getTest.call(r,t).match),!0!==a.static)return a.fn;if(!0===n&&void 0!==o.validPositions[t]&&!0!==o.validPositions[t].generatedInput)return!0;if(!0!==e&&t>-1){if(n){var s=i.getTests.call(r,t);return s.length>1+(""===s[s.length-1].match.def?1:0)}var l=i.determineTestTemplate.call(r,t,i.getTests.call(r,t)),u=i.getPlaceholder.call(r,t,l.match);return l.match.def!==u}return!1}function l(t,e,n){var r=this;void 0===n&&(n=!0);for(var o=t+1;""!==i.getTest.call(r,o).match.def&&(!0===e&&(!0!==i.getTest.call(r,o).match.newBlockMarker||!s.call(r,o,void 0,!0))||!0!==e&&!s.call(r,o,void 0,n));)o++;return o}function u(t){var e=this.opts,n=this.el;return!this.isRTL||"number"!=typeof t||e.greedy&&""===e.placeholder||!n||(t=this._valueGet().length-t)<0&&(t=0),t}},4713:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.determineTestTemplate=u,e.getDecisionTaker=a,e.getMaskTemplate=function(t,e,n,i,r){var o=this,a=this.opts,c=this.maskset,h=a.greedy;r&&a.greedy&&(a.greedy=!1,o.maskset.tests={}),e=e||0;var f,p,m,g,v=[],y=0;do{if(!0===t&&c.validPositions[y])p=(m=r&&c.validPositions[y].match.optionality&&void 0===c.validPositions[y+1]&&(!0===c.validPositions[y].generatedInput||c.validPositions[y].input==a.skipOptionalPartCharacter&&y>0)?u.call(o,y,d.call(o,y,f,y-1)):c.validPositions[y]).match,f=m.locator.slice(),v.push(!0===n?m.input:!1===n?p.nativeDef:s.call(o,y,p));else{p=(m=l.call(o,y,f,y-1)).match,f=m.locator.slice();var b=!0!==i&&(!1!==a.jitMasking?a.jitMasking:p.jit);(g=(g&&p.static&&p.def!==a.groupSeparator&&null===p.fn||c.validPositions[y-1]&&p.static&&p.def!==a.groupSeparator&&null===p.fn)&&c.tests[y])||!1===b||void 0===b||"number"==typeof b&&isFinite(b)&&b>y?v.push(!1===n?p.nativeDef:s.call(o,v.length,p)):g=!1}y++}while(!0!==p.static||""!==p.def||e>y);return""===v[v.length-1]&&v.pop(),!1===n&&void 0!==c.maskLength||(c.maskLength=y-1),a.greedy=h,v},e.getPlaceholder=s,e.getTest=c,e.getTestTemplate=l,e.getTests=d,e.isSubsetOf=h;var i,r=(i=n(2394))&&i.__esModule?i:{default:i};function o(t,e){var n=(null!=t.alternation?t.mloc[a(t)]:t.locator).join("");if(""!==n)for(;n.length<e;)n+="0";return n}function a(t){var e=t.locator[t.alternation];return"string"==typeof e&&e.length>0&&(e=e.split(",")[0]),void 0!==e?e.toString():""}function s(t,e,n){var i=this.opts,r=this.maskset;if(void 0!==(e=e||c.call(this,t).match).placeholder||!0===n)return"function"==typeof e.placeholder?e.placeholder(i):e.placeholder;if(!0===e.static){if(t>-1&&void 0===r.validPositions[t]){var o,a=d.call(this,t),s=[];if(a.length>1+(""===a[a.length-1].match.def?1:0))for(var l=0;l<a.length;l++)if(""!==a[l].match.def&&!0!==a[l].match.optionality&&!0!==a[l].match.optionalQuantifier&&(!0===a[l].match.static||void 0===o||!1!==a[l].match.fn.test(o.match.def,r,t,!0,i))&&(s.push(a[l]),!0===a[l].match.static&&(o=a[l]),s.length>1&&/[0-9a-bA-Z]/.test(s[0].match.def)))return i.placeholder.charAt(t%i.placeholder.length)}return e.def}return i.placeholder.charAt(t%i.placeholder.length)}function l(t,e,n){return this.maskset.validPositions[t]||u.call(this,t,d.call(this,t,e?e.slice():e,n))}function u(t,e){var n=this.opts,i=0,r=function(t,e){var n=0,i=!1;return e.forEach((function(t){t.match.optionality&&(0!==n&&n!==t.match.optionality&&(i=!0),(0===n||n>t.match.optionality)&&(n=t.match.optionality))})),n&&(0==t||1==e.length?n=0:i||(n=0)),n}(t,e);t=t>0?t-1:0;var a,s,l,u=o(c.call(this,t));n.greedy&&e.length>1&&""===e[e.length-1].match.def&&(i=1);for(var h=0;h<e.length-i;h++){var d=e[h];a=o(d,u.length);var f=Math.abs(a-u);(void 0===s||""!==a&&f<s||l&&!n.greedy&&l.match.optionality&&l.match.optionality-r>0&&"master"===l.match.newBlockMarker&&(!d.match.optionality||d.match.optionality-r<1||!d.match.newBlockMarker)||l&&!n.greedy&&l.match.optionalQuantifier&&!d.match.optionalQuantifier)&&(s=f,l=d)}return l}function c(t,e){var n=this.maskset;return n.validPositions[t]?n.validPositions[t]:(e||d.call(this,t))[0]}function h(t,e,n){function i(t){for(var e,n=[],i=-1,r=0,o=t.length;r<o;r++)if("-"===t.charAt(r))for(e=t.charCodeAt(r+1);++i<e;)n.push(String.fromCharCode(i));else i=t.charCodeAt(r),n.push(t.charAt(r));return n.join("")}return t.match.def===e.match.nativeDef||!(!(n.regex||t.match.fn instanceof RegExp&&e.match.fn instanceof RegExp)||!0===t.match.static||!0===e.match.static)&&-1!==i(e.match.fn.toString().replace(/[[\]/]/g,"")).indexOf(i(t.match.fn.toString().replace(/[[\]/]/g,"")))}function d(t,e,n){var i,o,a=this,s=this.dependencyLib,l=this.maskset,c=this.opts,d=this.el,f=l.maskToken,p=e?n:0,m=e?e.slice():[0],g=[],v=!1,y=e?e.join(""):"";function b(e,n,o,s){function u(o,s,f){function m(t,e){var n=0===e.matches.indexOf(t);return n||e.matches.every((function(i,r){return!0===i.isQuantifier?n=m(t,e.matches[r-1]):Object.prototype.hasOwnProperty.call(i,"matches")&&(n=m(t,i)),!n})),n}function w(t,e,n){var i,r;if((l.tests[t]||l.validPositions[t])&&(l.tests[t]||[l.validPositions[t]]).every((function(t,o){if(t.mloc[e])return i=t,!1;var a=void 0!==n?n:t.alternation,s=void 0!==t.locator[a]?t.locator[a].toString().indexOf(e):-1;return(void 0===r||s<r)&&-1!==s&&(i=t,r=s),!0})),i){var o=i.locator[i.alternation];return(i.mloc[e]||i.mloc[o]||i.locator).slice((void 0!==n?n:i.alternation)+1)}return void 0!==n?w(t,e):void 0}function x(t,e){var n=t.alternation,i=void 0===e||n===e.alternation&&-1===t.locator[n].toString().indexOf(e.locator[n]);if(!i&&n>e.alternation)for(var r=e.alternation;r<n;r++)if(t.locator[r]!==e.locator[r]){n=r,i=!0;break}if(i){t.mloc=t.mloc||{};var o=t.locator[n];if(void 0!==o){if("string"==typeof o&&(o=o.split(",")[0]),void 0===t.mloc[o]&&(t.mloc[o]=t.locator.slice()),void 0!==e){for(var a in e.mloc)"string"==typeof a&&(a=a.split(",")[0]),void 0===t.mloc[a]&&(t.mloc[a]=e.mloc[a]);t.locator[n]=Object.keys(t.mloc).join(",")}return!0}t.alternation=void 0}return!1}function k(t,e){if(t.locator.length!==e.locator.length)return!1;for(var n=t.alternation+1;n<t.locator.length;n++)if(t.locator[n]!==e.locator[n])return!1;return!0}if(p>t+c._maxTestPos)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+l.mask;if(p===t&&void 0===o.matches){if(g.push({match:o,locator:s.reverse(),cd:y,mloc:{}}),!o.optionality||void 0!==f||!(c.definitions&&c.definitions[o.nativeDef]&&c.definitions[o.nativeDef].optional||r.default.prototype.definitions[o.nativeDef]&&r.default.prototype.definitions[o.nativeDef].optional))return!0;v=!0,p=t}else if(void 0!==o.matches){if(o.isGroup&&f!==o)return function(){if(o=u(e.matches[e.matches.indexOf(o)+1],s,f))return!0}();if(o.isOptional)return function(){var e=o,r=g.length;if(o=b(o,n,s,f),g.length>0){if(g.forEach((function(t,e){e>=r&&(t.match.optionality=t.match.optionality?t.match.optionality+1:1)})),i=g[g.length-1].match,void 0!==f||!m(i,e))return o;v=!0,p=t}}();if(o.isAlternator)return function(){a.hasAlternator=!0;var i,r,m,y=o,b=[],_=g.slice(),S=s.length,C=!1,T=n.length>0?n.shift():-1;if(-1===T||"string"==typeof T){var O,E=p,A=n.slice(),L=[];if("string"==typeof T)L=T.split(",");else for(O=0;O<y.matches.length;O++)L.push(O.toString());if(void 0!==l.excludes[t]){for(var M=L.slice(),P=0,N=l.excludes[t].length;P<N;P++){var D=l.excludes[t][P].toString().split(":");s.length==D[1]&&L.splice(L.indexOf(D[0]),1)}0===L.length&&(delete l.excludes[t],L=M)}(!0===c.keepStatic||isFinite(parseInt(c.keepStatic))&&E>=c.keepStatic)&&(L=L.slice(0,1));for(var j=0;j<L.length;j++){O=parseInt(L[j]),g=[],n="string"==typeof T&&w(p,O,S)||A.slice();var I=y.matches[O];if(I&&u(I,[O].concat(s),f))o=!0;else if(0===j&&(C=!0),I&&I.matches&&I.matches.length>y.matches[0].matches.length)break;i=g.slice(),p=E,g=[];for(var R=0;R<i.length;R++){var F=i[R],B=!1;F.match.jit=F.match.jit||C,F.alternation=F.alternation||S,x(F);for(var z=0;z<b.length;z++){var q=b[z];if("string"!=typeof T||void 0!==F.alternation&&L.includes(F.locator[F.alternation].toString())){if(F.match.nativeDef===q.match.nativeDef){B=!0,x(q,F);break}if(h(F,q,c)){x(F,q)&&(B=!0,b.splice(b.indexOf(q),0,F));break}if(h(q,F,c)){x(q,F);break}if(m=q,!0===(r=F).match.static&&!0!==m.match.static&&m.match.fn.test(r.match.def,l,t,!1,c,!1)){k(F,q)||void 0!==d.inputmask.userOptions.keepStatic?x(F,q)&&(B=!0,b.splice(b.indexOf(q),0,F)):c.keepStatic=!0;break}}}B||b.push(F)}}g=_.concat(b),p=t,v=g.length>0,o=b.length>0,n=A.slice()}else o=u(y.matches[T]||e.matches[T],[T].concat(s),f);if(o)return!0}();if(o.isQuantifier&&f!==e.matches[e.matches.indexOf(o)-1])return function(){for(var r=o,a=!1,h=n.length>0?n.shift():0;h<(isNaN(r.quantifier.max)?h+1:r.quantifier.max)&&p<=t;h++){var d=e.matches[e.matches.indexOf(r)-1];if(o=u(d,[h].concat(s),d)){if(g.forEach((function(e,n){(i=_(d,e.match)?e.match:g[g.length-1].match).optionalQuantifier=h>=r.quantifier.min,i.jit=(h+1)*(d.matches.indexOf(i)+1)>r.quantifier.jit,i.optionalQuantifier&&m(i,d)&&(v=!0,p=t,c.greedy&&null==l.validPositions[t-1]&&h>r.quantifier.min&&-1!=["*","+"].indexOf(r.quantifier.max)&&(g.pop(),y=void 0),a=!0,o=!1),!a&&i.jit&&(l.jitOffset[t]=d.matches.length-d.matches.indexOf(i))})),a)break;return!0}}}();if(o=b(o,n,s,f))return!0}else p++}for(var f=n.length>0?n.shift():0;f<e.matches.length;f++)if(!0!==e.matches[f].isQuantifier){var m=u(e.matches[f],[f].concat(o),s);if(m&&p===t)return m;if(p>t)break}}function _(t,e){var n=-1!=t.matches.indexOf(e);return n||t.matches.forEach((function(t,i){void 0===t.matches||n||(n=_(t,e))})),n}if(t>-1){if(void 0===e){for(var w,x=t-1;void 0===(w=l.validPositions[x]||l.tests[x])&&x>-1;)x--;void 0!==w&&x>-1&&(m=function(t,e){var n,i=[];return Array.isArray(e)||(e=[e]),e.length>0&&(void 0===e[0].alternation||!0===c.keepStatic?0===(i=u.call(a,t,e.slice()).locator.slice()).length&&(i=e[0].locator.slice()):e.forEach((function(t){""!==t.def&&(0===i.length?(n=t.alternation,i=t.locator.slice()):t.locator[n]&&-1===i[n].toString().indexOf(t.locator[n])&&(i[n]+=","+t.locator[n]))}))),i}(x,w),y=m.join(""),p=x)}if(l.tests[t]&&l.tests[t][0].cd===y)return l.tests[t];for(var k=m.shift();k<f.length&&!(b(f[k],m,[k])&&p===t||p>t);k++);}return(0===g.length||v)&&g.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:y}),void 0!==e&&l.tests[t]?o=s.extend(!0,[],g):(l.tests[t]=s.extend(!0,[],g),o=l.tests[t]),g.forEach((function(t){t.match.optionality=t.match.defOptionality||!1})),o}},7215:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.alternate=s,e.checkAlternationMatch=function(t,e,n){for(var i,r=this.opts.greedy?e:e.slice(0,1),o=!1,a=void 0!==n?n.split(","):[],s=0;s<a.length;s++)-1!==(i=t.indexOf(a[s]))&&t.splice(i,1);for(var l=0;l<t.length;l++)if(r.includes(t[l])){o=!0;break}return o},e.handleRemove=function(t,e,n,a,l){var u=this,c=this.maskset,h=this.opts;if((h.numericInput||u.isRTL)&&(e===r.keys.Backspace?e=r.keys.Delete:e===r.keys.Delete&&(e=r.keys.Backspace),u.isRTL)){var d=n.end;n.end=n.begin,n.begin=d}var f,p=o.getLastValidPosition.call(u,void 0,!0);if(n.end>=o.getBuffer.call(u).length&&p>=n.end&&(n.end=p+1),e===r.keys.Backspace?n.end-n.begin<1&&(n.begin=o.seekPrevious.call(u,n.begin)):e===r.keys.Delete&&n.begin===n.end&&(n.end=o.isMask.call(u,n.end,!0,!0)?n.end+1:o.seekNext.call(u,n.end)+1),!1!==(f=m.call(u,n))){if(!0!==a&&!1!==h.keepStatic||null!==h.regex&&-1!==i.getTest.call(u,n.begin).match.def.indexOf("|")){var g=s.call(u,!0);if(g){var v=void 0!==g.caret?g.caret:g.pos?o.seekNext.call(u,g.pos.begin?g.pos.begin:g.pos):o.getLastValidPosition.call(u,-1,!0);(e!==r.keys.Delete||n.begin>v)&&n.begin}}!0!==a&&(c.p=e===r.keys.Delete?n.begin+f:n.begin,c.p=o.determineNewCaretPosition.call(u,{begin:c.p,end:c.p},!1,!1===h.insertMode&&e===r.keys.Backspace?"none":void 0).begin)}},e.isComplete=u,e.isSelection=c,e.isValid=h,e.refreshFromBuffer=f,e.revalidateMask=m;var i=n(4713),r=n(2839),o=n(8711),a=n(6030);function s(t,e,n,r,a,l){var u,c,d,f,p,m,g,v,y,b,_,w=this,x=this.dependencyLib,k=this.opts,S=w.maskset,C=x.extend(!0,[],S.validPositions),T=x.extend(!0,{},S.tests),O=!1,E=!1,A=void 0!==a?a:o.getLastValidPosition.call(w);if(l&&(b=l.begin,_=l.end,l.begin>l.end&&(b=l.end,_=l.begin)),-1===A&&void 0===a)u=0,c=(f=i.getTest.call(w,u)).alternation;else for(;A>=0;A--)if((d=S.validPositions[A])&&void 0!==d.alternation){if(A<=(t||0)&&f&&f.locator[d.alternation]!==d.locator[d.alternation])break;u=A,c=S.validPositions[u].alternation,f=d}if(void 0!==c){g=parseInt(u),S.excludes[g]=S.excludes[g]||[],!0!==t&&S.excludes[g].push((0,i.getDecisionTaker)(f)+":"+f.alternation);var L=[],M=-1;for(p=g;p<o.getLastValidPosition.call(w,void 0,!0)+1;p++)-1===M&&t<=p&&void 0!==e&&(L.push(e),M=L.length-1),(m=S.validPositions[p])&&!0!==m.generatedInput&&(void 0===l||p<b||p>=_)&&L.push(m.input),delete S.validPositions[p];for(-1===M&&void 0!==e&&(L.push(e),M=L.length-1);void 0!==S.excludes[g]&&S.excludes[g].length<10;){for(S.tests={},o.resetMaskSet.call(w,!0),O=!0,p=0;p<L.length&&(v=O.caret||o.getLastValidPosition.call(w,void 0,!0)+1,y=L[p],O=h.call(w,v,y,!1,r,!0));p++)p===M&&(E=O),1==t&&O&&(E={caretPos:p});if(O)break;if(o.resetMaskSet.call(w),f=i.getTest.call(w,g),S.validPositions=x.extend(!0,[],C),S.tests=x.extend(!0,{},T),!S.excludes[g]){E=s.call(w,t,e,n,r,g-1,l);break}var P=(0,i.getDecisionTaker)(f);if(-1!==S.excludes[g].indexOf(P+":"+f.alternation)){E=s.call(w,t,e,n,r,g-1,l);break}for(S.excludes[g].push(P+":"+f.alternation),p=g;p<o.getLastValidPosition.call(w,void 0,!0)+1;p++)delete S.validPositions[p]}}return E&&!1===k.keepStatic||delete S.excludes[g],E}function l(t,e,n){var i=this.opts,o=this.maskset;switch(i.casing||e.casing){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase();break;case"title":var a=o.validPositions[n-1];t=0===n||a&&a.input===String.fromCharCode(r.keyCode.Space)?t.toUpperCase():t.toLowerCase();break;default:if("function"==typeof i.casing){var s=Array.prototype.slice.call(arguments);s.push(o.validPositions),t=i.casing.apply(this,s)}}return t}function u(t){var e=this,n=this.opts,r=this.maskset;if("function"==typeof n.isComplete)return n.isComplete(t,n);if("*"!==n.repeat){var a=!1,s=o.determineLastRequiredPosition.call(e,!0),l=o.seekPrevious.call(e,s.l);if(void 0===s.def||s.def.newBlockMarker||s.def.optionality||s.def.optionalQuantifier){a=!0;for(var u=0;u<=l;u++){var c=i.getTestTemplate.call(e,u).match;if(!0!==c.static&&void 0===r.validPositions[u]&&!0!==c.optionality&&!0!==c.optionalQuantifier||!0===c.static&&t[u]!==i.getPlaceholder.call(e,u,c)){a=!1;break}}}return a}}function c(t){var e=this.opts.insertMode?0:1;return this.isRTL?t.begin-t.end>e:t.end-t.begin>e}function h(t,e,n,r,a,d,g){var v=this,y=this.dependencyLib,b=this.opts,_=v.maskset;n=!0===n;var w=t;function x(t){if(void 0!==t){if(void 0!==t.remove&&(Array.isArray(t.remove)||(t.remove=[t.remove]),t.remove.sort((function(t,e){return v.isRTL?t.pos-e.pos:e.pos-t.pos})).forEach((function(t){m.call(v,{begin:t,end:t+1})})),t.remove=void 0),void 0!==t.insert&&(Array.isArray(t.insert)||(t.insert=[t.insert]),t.insert.sort((function(t,e){return v.isRTL?e.pos-t.pos:t.pos-e.pos})).forEach((function(t){""!==t.c&&h.call(v,t.pos,t.c,void 0===t.strict||t.strict,void 0!==t.fromIsValid?t.fromIsValid:r)})),t.insert=void 0),t.refreshFromBuffer&&t.buffer){var e=t.refreshFromBuffer;f.call(v,!0===e?e:e.start,e.end,t.buffer),t.refreshFromBuffer=void 0}void 0!==t.rewritePosition&&(w=t.rewritePosition,t=!0)}return t}function k(e,n,a){var s=!1;return i.getTests.call(v,e).every((function(u,h){var d=u.match;if(o.getBuffer.call(v,!0),!1!==(s=(!d.jit||void 0!==_.validPositions[o.seekPrevious.call(v,e)])&&(null!=d.fn?d.fn.test(n,_,e,a,b,c.call(v,t)):(n===d.def||n===b.skipOptionalPartCharacter)&&""!==d.def&&{c:i.getPlaceholder.call(v,e,d,!0)||d.def,pos:e}))){var f=void 0!==s.c?s.c:n,p=e;return f=f===b.skipOptionalPartCharacter&&!0===d.static?i.getPlaceholder.call(v,e,d,!0)||d.def:f,!0!==(s=x(s))&&void 0!==s.pos&&s.pos!==e&&(p=s.pos),!0!==s&&void 0===s.pos&&void 0===s.c||!1===m.call(v,t,y.extend({},u,{input:l.call(v,f,d,p)}),r,p)&&(s=!1),!1}return!0})),s}void 0!==t.begin&&(w=v.isRTL?t.end:t.begin);var S=!0,C=y.extend(!0,{},_.validPositions);if(!1===b.keepStatic&&void 0!==_.excludes[w]&&!0!==a&&!0!==r)for(var T=w;T<(v.isRTL?t.begin:t.end);T++)void 0!==_.excludes[T]&&(_.excludes[T]=void 0,delete _.tests[T]);if("function"==typeof b.preValidation&&!0!==r&&!0!==d&&(S=x(S=b.preValidation.call(v,o.getBuffer.call(v),w,e,c.call(v,t),b,_,t,n||a))),!0===S){if(S=k(w,e,n),(!n||!0===r)&&!1===S&&!0!==d){var O=_.validPositions[w];if(!O||!0!==O.match.static||O.match.def!==e&&e!==b.skipOptionalPartCharacter){if(b.insertMode||void 0===_.validPositions[o.seekNext.call(v,w)]||t.end>w){var E=!1;if(_.jitOffset[w]&&void 0===_.validPositions[o.seekNext.call(v,w)]&&!1!==(S=h.call(v,w+_.jitOffset[w],e,!0,!0))&&(!0!==a&&(S.caret=w),E=!0),t.end>w&&(_.validPositions[w]=void 0),!E&&!o.isMask.call(v,w,b.keepStatic&&0===w))for(var A=w+1,L=o.seekNext.call(v,w,!1,0!==w);A<=L;A++)if(!1!==(S=k(A,e,n))){S=p.call(v,w,void 0!==S.pos?S.pos:A)||S,w=A;break}}}else S={caret:o.seekNext.call(v,w)}}v.hasAlternator&&!0!==a&&!n&&(!1===S&&b.keepStatic&&(u.call(v,o.getBuffer.call(v))||0===w)?S=s.call(v,w,e,n,r,void 0,t):(c.call(v,t)&&_.tests[w]&&_.tests[w].length>1&&b.keepStatic||1==S&&!0!==b.numericInput&&_.tests[w]&&_.tests[w].length>1&&o.getLastValidPosition.call(v,void 0,!0)>w)&&(S=s.call(v,!0))),!0===S&&(S={pos:w})}if("function"==typeof b.postValidation&&!0!==r&&!0!==d){var M=b.postValidation.call(v,o.getBuffer.call(v,!0),void 0!==t.begin?v.isRTL?t.end:t.begin:t,e,S,b,_,n,g);void 0!==M&&(S=!0===M?S:M)}S&&void 0===S.pos&&(S.pos=w),!1===S||!0===d?(o.resetMaskSet.call(v,!0),_.validPositions=y.extend(!0,[],C)):p.call(v,void 0,w,!0);var P=x(S);return void 0!==v.maxLength&&o.getBuffer.call(v).length>v.maxLength&&!r&&(o.resetMaskSet.call(v,!0),_.validPositions=y.extend(!0,[],C),P=!1),P}function d(t,e,n){for(var r=this.maskset,o=!1,a=i.getTests.call(this,t),s=0;s<a.length;s++){if(a[s].match&&(a[s].match.nativeDef===e.match[n.shiftPositions?"def":"nativeDef"]&&(!n.shiftPositions||!e.match.static)||a[s].match.nativeDef===e.match.nativeDef||n.regex&&!a[s].match.static&&a[s].match.fn.test(e.input,r,t,!1,n))){o=!0;break}if(a[s].match&&a[s].match.def===e.match.nativeDef){o=void 0;break}}return!1===o&&void 0!==r.jitOffset[t]&&(o=d.call(this,t+r.jitOffset[t],e,n)),o}function f(t,e,n){var i,r,s=this,l=this.maskset,u=this.opts,c=this.dependencyLib,h=u.skipOptionalPartCharacter,d=s.isRTL?n.slice().reverse():n;if(u.skipOptionalPartCharacter="",!0===t)o.resetMaskSet.call(s),l.tests={},t=0,e=n.length,r=o.determineNewCaretPosition.call(s,{begin:0,end:0},!1).begin;else{for(i=t;i<e;i++)delete l.validPositions[i];r=t}var f=new c.Event("keypress");for(i=t;i<e;i++){f.key=d[i].toString(),s.ignorable=!1;var p=a.EventHandlers.keypressEvent.call(s,f,!0,!1,!1,r);!1!==p&&void 0!==p&&(r=p.forwardPosition)}u.skipOptionalPartCharacter=h}function p(t,e,n){var r=this,a=this.maskset,s=this.dependencyLib;if(void 0===t)for(t=e-1;t>0&&!a.validPositions[t];t--);for(var l=t;l<e;l++)if(void 0===a.validPositions[l]&&!o.isMask.call(r,l,!1)&&(0==l?i.getTest.call(r,l):a.validPositions[l-1])){var u=i.getTests.call(r,l).slice();""===u[u.length-1].match.def&&u.pop();var c,d=i.determineTestTemplate.call(r,l,u);if(d&&(!0!==d.match.jit||"master"===d.match.newBlockMarker&&(c=a.validPositions[l+1])&&!0===c.match.optionalQuantifier)&&((d=s.extend({},d,{input:i.getPlaceholder.call(r,l,d.match,!0)||d.match.def})).generatedInput=!0,m.call(r,l,d,!0),!0!==n)){var f=a.validPositions[e].input;return a.validPositions[e]=void 0,h.call(r,e,f,!0,!0)}}}function m(t,e,n,r){var a=this,s=this.maskset,l=this.opts,u=this.dependencyLib;function c(t,e,n){var i=e[t];if(void 0!==i&&!0===i.match.static&&!0!==i.match.optionality&&(void 0===e[0]||void 0===e[0].alternation)){var r=n.begin<=t-1?e[t-1]&&!0===e[t-1].match.static&&e[t-1]:e[t-1],o=n.end>t+1?e[t+1]&&!0===e[t+1].match.static&&e[t+1]:e[t+1];return r&&o}return!1}var f=0,p=void 0!==t.begin?t.begin:t,m=void 0!==t.end?t.end:t,g=!0;if(t.begin>t.end&&(p=t.end,m=t.begin),r=void 0!==r?r:p,void 0===n&&(p!==m||l.insertMode&&void 0!==s.validPositions[r]||void 0===e||e.match.optionalQuantifier||e.match.optionality)){var v,y=u.extend(!0,{},s.validPositions),b=o.getLastValidPosition.call(a,void 0,!0);for(s.p=p,v=b;v>=p;v--)delete s.validPositions[v],void 0===e&&delete s.tests[v+1];var _,w,x=r,k=x;for(e&&(s.validPositions[r]=u.extend(!0,{},e),k++,x++),v=e?m:m-1;v<=b;v++){if(void 0!==(_=y[v])&&!0!==_.generatedInput&&(v>=m||v>=p&&c(v,y,{begin:p,end:m}))){for(;""!==i.getTest.call(a,k).match.def;){if(!1!==(w=d.call(a,k,_,l))||"+"===_.match.def){"+"===_.match.def&&o.getBuffer.call(a,!0);var S=h.call(a,k,_.input,"+"!==_.match.def,!0);if(g=!1!==S,x=(S.pos||k)+1,!g&&w)break}else g=!1;if(g){void 0===e&&_.match.static&&v===t.begin&&f++;break}if(!g&&o.getBuffer.call(a),k>s.maskLength)break;k++}""==i.getTest.call(a,k).match.def&&(g=!1),k=x}if(!g)break}if(!g)return s.validPositions=u.extend(!0,[],y),o.resetMaskSet.call(a,!0),!1}else e&&i.getTest.call(a,r).match.cd===e.match.cd&&(s.validPositions[r]=u.extend(!0,{},e));return o.resetMaskSet.call(a,!0),f}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}var i={};return function(){var t,e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n(7149),n(3194),n(9302),n(4013),n(3851),n(219),n(207),n(5296);var r=((t=n(2394))&&t.__esModule?t:{default:t}).default;e.default=r}(),i}()},3481:function(t,e){!function(t){"use strict";var e="1.9.4";function n(t){var e,n,i,r;for(n=1,i=arguments.length;n<i;n++)for(e in r=arguments[n])t[e]=r[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function r(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var o=0;function a(t){return"_leaflet_id"in t||(t._leaflet_id=++o),t._leaflet_id}function s(t,e,n){var i,r,o,a;return a=function(){i=!1,r&&(o.apply(n,r),r=!1)},o=function(){i?r=arguments:(t.apply(n,arguments),setTimeout(a,e),i=!0)},o}function l(t,e,n){var i=e[1],r=e[0],o=i-r;return t===i&&n?t:((t-r)%o+o)%o+r}function u(){return!1}function c(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return h(t).split(/\s+/)}function f(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function p(t,e,n){var i=[];for(var r in t)i.push(encodeURIComponent(n?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function g(t,e){return t.replace(m,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var b="";function _(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var k=window.requestAnimationFrame||_("RequestAnimationFrame")||x,S=window.cancelAnimationFrame||_("CancelAnimationFrame")||_("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,n){if(!n||k!==x)return k.call(window,r(t,e));t.call(e)}function T(t){t&&S.call(window,t)}var O={__proto__:null,extend:n,create:i,bind:r,get lastId(){return o},stamp:a,throttle:s,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:d,setOptions:f,getParamString:p,template:g,isArray:v,indexOf:y,emptyImageUrl:b,requestFn:k,cancelFn:S,requestAnimFrame:C,cancelAnimFrame:T};function E(){}function A(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;e++)t[e],L.Mixin.Events}}E.extend=function(t){var e=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},r=e.__super__=this.prototype,o=i(r);for(var a in o.constructor=e,e.prototype=o,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&n(e,t.statics),t.includes&&(A(t.includes),n.apply(null,[o].concat(t.includes))),n(o,t),delete o.statics,delete o.includes,o.options&&(o.options=r.options?i(r.options):{},n(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){r.callInitHooks&&r.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},E.include=function(t){var e=this.prototype.options;return n(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},E.mergeOptions=function(t){return n(this.prototype.options,t),this},E.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var M={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var r=0,o=(t=d(t)).length;r<o;r++)this._on(t[r],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=d(t);for(var r=1===arguments.length,o=0,a=t.length;o<a;o++)r?this._off(t[o]):this._off(t[o],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e&&!1===this._listens(t,e,n)){n===this&&(n=void 0);var r={fn:e,ctx:n};i&&(r.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(r)}},_off:function(t,e,n){var i,r,o;if(this._events&&(i=this._events[t]))if(1!==arguments.length){if("function"==typeof e){var a=this._listens(t,e,n);if(!1!==a){var s=i[a];this._firingCount&&(s.fn=u,this._events[t]=i=i.slice()),i.splice(a,1)}}}else{if(this._firingCount)for(r=0,o=i.length;r<o;r++)i[r].fn=u;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var r=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,s=o.length;a<s;a++){var l=o[a],u=l.fn;l.once&&this.off(t,u,l.ctx),u.call(l.ctx||this,r)}this._firingCount--}}return i&&this._propagateEvent(r),this},listens:function(t,e,n,i){var r=e;"function"!=typeof e&&(i=!!e,r=void 0,n=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,r,n))return!0;if(i)for(var a in this._eventParents)if(this._eventParents[a].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var r=0,o=i.length;r<o;r++)if(i[r].fn===e&&i[r].ctx===n)return r;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var r=0,o=(t=d(t)).length;r<o;r++)this._on(t[r],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};M.addEventListener=M.on,M.removeEventListener=M.clearAllEventListeners=M.off,M.addOneTimeEventListener=M.once,M.fireEvent=M.fire,M.hasEventListeners=M.listens;var P=E.extend(M);function N(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function j(t,e,n){return t instanceof N?t:v(t)?new N(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new N(t.x,t.y):new N(t,e,n)}function I(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i<r;i++)this.extend(n[i])}function R(t,e){return!t||t instanceof I?t:new I(t,e)}function F(t,e){if(t)for(var n=e?[t,e]:t,i=0,r=n.length;i<r;i++)this.extend(n[i])}function B(t,e){return t instanceof F?t:new F(t,e)}function z(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function q(t,e,n){return t instanceof z?t:v(t)&&"object"!=typeof t[0]?3===t.length?new z(t[0],t[1],t[2]):2===t.length?new z(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new z(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new z(t,e,n)}N.prototype={clone:function(){return new N(this.x,this.y)},add:function(t){return this.clone()._add(j(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(j(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new N(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new N(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=D(this.x),this.y=D(this.y),this},distanceTo:function(t){var e=(t=j(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=j(t)).x===this.x&&t.y===this.y},contains:function(t){return t=j(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},I.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof N||"number"==typeof t[0]||"x"in t)e=n=j(t);else if(e=(t=R(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return j((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return j(this.min.x,this.max.y)},getTopRight:function(){return j(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof N?j(t):R(t))instanceof I?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=t.max,o=r.x>=e.x&&i.x<=n.x,a=r.y>=e.y&&i.y<=n.y;return o&&a},overlaps:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=t.max,o=r.x>e.x&&i.x<n.x,a=r.y>e.y&&i.y<n.y;return o&&a},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,r=Math.abs(e.y-n.y)*t;return R(j(e.x-i,e.y-r),j(n.x+i,n.y+r))},equals:function(t){return!!t&&(t=R(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},F.prototype={extend:function(t){var e,n,i=this._southWest,r=this._northEast;if(t instanceof z)e=t,n=t;else{if(!(t instanceof F))return t?this.extend(q(t)||B(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||r?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),r.lat=Math.max(n.lat,r.lat),r.lng=Math.max(n.lng,r.lng)):(this._southWest=new z(e.lat,e.lng),this._northEast=new z(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,r=Math.abs(e.lng-n.lng)*t;return new F(new z(e.lat-i,e.lng-r),new z(n.lat+i,n.lng+r))},getCenter:function(){return new z((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new z(this.getNorth(),this.getWest())},getSouthEast:function(){return new z(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof z||"lat"in t?q(t):B(t);var e,n,i=this._southWest,r=this._northEast;return t instanceof F?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&i.lat<=n.lat,a=r.lng>=e.lng&&i.lng<=n.lng;return o&&a},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&i.lat<n.lat,a=r.lng>e.lng&&i.lng<n.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=B(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},z.prototype={equals:function(t,e){return!!t&&(t=q(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,q(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return B([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new z(this.lat,this.lng,this.alt)}};var H,W={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new I(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new z(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,r=e.lng-n.lng;if(0===i&&0===r)return t;var o=t.getSouthWest(),a=t.getNorthEast();return new F(new z(o.lat-i,o.lng-r),new z(a.lat-i,a.lng-r))}},U=n({},W,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,r=e.lat*n,o=Math.sin((e.lat-t.lat)*n/2),a=Math.sin((e.lng-t.lng)*n/2),s=o*o+Math.cos(i)*Math.cos(r)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),V=6378137,Z={R:V,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),r=Math.sin(i*e);return new N(this.R*t.lng*e,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(t){var e=180/Math.PI;return new z((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(H=V*Math.PI,new I([-H,-H],[H,H]))};function Y(t,e,n,i){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function $(t,e,n,i){return new Y(t,e,n,i)}Y.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new N((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var G=n({},U,{code:"EPSG:3857",projection:Z,transformation:function(){var t=.5/(Math.PI*Z.R);return $(t,.5,-t,.5)}()}),K=n({},G,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var n,i,r,o,a,s,l="";for(n=0,r=t.length;n<r;n++){for(i=0,o=(a=t[n]).length;i<o;i++)l+=(i?"L":"M")+(s=a[i]).x+" "+s.y;l+=e?Ft.svg?"z":"x":""}return l||"M0 0"}var Q,tt=document.documentElement.style,et="ActiveXObject"in window,nt=et&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),rt=Rt("webkit"),ot=Rt("android"),at=Rt("android 2")||Rt("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=ot&&Rt("Google")&&st<537&&!("AudioNode"in window),ut=!!window.opera,ct=!it&&Rt("chrome"),ht=Rt("gecko")&&!rt&&!ut&&!et,dt=!ct&&Rt("safari"),ft=Rt("phantom"),pt="OTransition"in tt,mt=0===navigator.platform.indexOf("Win"),gt=et&&"transition"in tt,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!at,yt="MozPerspective"in tt,bt=!window.L_DISABLE_3D&&(gt||vt||yt)&&!pt&&!ft,_t="undefined"!=typeof orientation||Rt("mobile"),wt=_t&&rt,xt=_t&&vt,kt=!window.PointerEvent&&window.MSPointerEvent,St=!(!window.PointerEvent&&!kt),Ct="ontouchstart"in window||!!window.TouchEvent,Tt=!window.L_NO_TOUCH&&(Ct||St),Ot=_t&&ut,Et=_t&&ht,At=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Lt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),Mt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!X("svg").createSVGRect),Nt=!!Pt&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Dt=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),jt=0===navigator.platform.indexOf("Mac"),It=0===navigator.platform.indexOf("Linux");function Rt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ft={ie:et,ielt9:nt,edge:it,webkit:rt,android:ot,android23:at,androidStock:lt,opera:ut,chrome:ct,gecko:ht,safari:dt,phantom:ft,opera12:pt,win:mt,ie3d:gt,webkit3d:vt,gecko3d:yt,any3d:bt,mobile:_t,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:kt,pointer:St,touch:Tt,touchNative:Ct,mobileOpera:Ot,mobileGecko:Et,retina:At,passiveEvents:Lt,canvas:Mt,svg:Pt,vml:Dt,inlineSvg:Nt,mac:jt,linux:It},Bt=Ft.msPointer?"MSPointerDown":"pointerdown",zt=Ft.msPointer?"MSPointerMove":"pointermove",qt=Ft.msPointer?"MSPointerUp":"pointerup",Ht=Ft.msPointer?"MSPointerCancel":"pointercancel",Wt={touchstart:Bt,touchmove:zt,touchend:qt,touchcancel:Ht},Ut={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},Vt={},Zt=!1;function Yt(t,e,n){return"touchstart"===e&&Jt(),Ut[e]?(n=Ut[e].bind(this,n),t.addEventListener(Wt[e],n,!1),n):u}function $t(t,e,n){Wt[e]&&t.removeEventListener(Wt[e],n,!1)}function Gt(t){Vt[t.pointerId]=t}function Kt(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function Xt(t){delete Vt[t.pointerId]}function Jt(){Zt||(document.addEventListener(Bt,Gt,!0),document.addEventListener(zt,Kt,!0),document.addEventListener(qt,Xt,!0),document.addEventListener(Ht,Xt,!0),Zt=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Vt)e.touches.push(Vt[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ge(e),Qt(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function r(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var r=Xe(t);if(!r.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||r.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var o=Date.now();o-i<=ne?2==++n&&e(ee(t)):n=1,i=o}}}else n=t.detail}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}function re(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var oe,ae,se,le,ue,ce=Oe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),he=Oe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===he||"OTransition"===he?he+"End":"transitionend";function fe(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function me(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ge(t){var e=t.parentNode;e&&e.removeChild(t)}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ye(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function be(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function _e(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Se(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function we(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,r=n.length;i<r;i++)t.classList.add(n[i]);else if(!_e(t,e)){var o=Se(t);ke(t,(o?o+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):ke(t,h((" "+Se(t)+" ").replace(" "+e+" "," ")))}function ke(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function Se(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Ce(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Te(t,e)}function Te(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function Oe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Ee(t,e,n){var i=e||new N(0,0);t.style[ce]=(Ft.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Ae(t,e){t._leaflet_pos=e,Ft.any3d?Ee(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Le(t){return t._leaflet_pos||new N(0,0)}if("onselectstart"in document)oe=function(){Be(window,"selectstart",Ge)},ae=function(){qe(window,"selectstart",Ge)};else{var Me=Oe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);oe=function(){if(Me){var t=document.documentElement.style;se=t[Me],t[Me]="none"}},ae=function(){Me&&(document.documentElement.style[Me]=se,se=void 0)}}function Pe(){Be(window,"dragstart",Ge)}function Ne(){qe(window,"dragstart",Ge)}function De(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(je(),le=t,ue=t.style.outlineStyle,t.style.outlineStyle="none",Be(window,"keydown",je))}function je(){le&&(le.style.outlineStyle=ue,le=void 0,ue=void 0,qe(window,"keydown",je))}function Ie(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Re(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Fe={__proto__:null,TRANSFORM:ce,TRANSITION:he,TRANSITION_END:de,get:fe,getStyle:pe,create:me,remove:ge,empty:ve,toFront:ye,toBack:be,hasClass:_e,addClass:we,removeClass:xe,setClass:ke,getClass:Se,setOpacity:Ce,testProp:Oe,setTransform:Ee,setPosition:Ae,getPosition:Le,get disableTextSelection(){return oe},get enableTextSelection(){return ae},disableImageDrag:Pe,enableImageDrag:Ne,preventOutline:De,restoreOutline:je,getSizedParentNode:Ie,getScale:Re};function Be(t,e,n,i){if(e&&"object"==typeof e)for(var r in e)Ue(t,r,e[r],n);else for(var o=0,a=(e=d(e)).length;o<a;o++)Ue(t,e[o],n,i);return this}var ze="_leaflet_events";function qe(t,e,n,i){if(1===arguments.length)He(t),delete t[ze];else if(e&&"object"==typeof e)for(var r in e)Ve(t,r,e[r],n);else if(e=d(e),2===arguments.length)He(t,(function(t){return-1!==y(e,t)}));else for(var o=0,a=e.length;o<a;o++)Ve(t,e[o],n,i);return this}function He(t,e){for(var n in t[ze]){var i=n.split(/\d/)[0];e&&!e(i)||Ve(t,i,null,null,n)}}var We={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ue(t,e,n,i){var r=e+a(n)+(i?"_"+a(i):"");if(t[ze]&&t[ze][r])return this;var o=function(e){return n.call(i||t,e||window.event)},s=o;!Ft.touchNative&&Ft.pointer&&0===e.indexOf("touch")?o=Yt(t,e,o):Ft.touch&&"dblclick"===e?o=ie(t,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(We[e]||e,o,!!Ft.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(o=function(e){e=e||window.event,en(t,e)&&s(e)},t.addEventListener(We[e],o,!1)):t.addEventListener(e,s,!1):t.attachEvent("on"+e,o),t[ze]=t[ze]||{},t[ze][r]=o}function Ve(t,e,n,i,r){r=r||e+a(n)+(i?"_"+a(i):"");var o=t[ze]&&t[ze][r];if(!o)return this;!Ft.touchNative&&Ft.pointer&&0===e.indexOf("touch")?$t(t,e,o):Ft.touch&&"dblclick"===e?re(t,o):"removeEventListener"in t?t.removeEventListener(We[e]||e,o,!1):t.detachEvent("on"+e,o),t[ze][r]=null}function Ze(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ye(t){return Ue(t,"wheel",Ze),this}function $e(t){return Be(t,"mousedown touchstart dblclick contextmenu",Ze),t._leaflet_disable_click=!0,this}function Ge(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ke(t){return Ge(t),Ze(t),this}function Xe(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Je(t,e){if(!e)return new N(t.clientX,t.clientY);var n=Re(e),i=n.boundingClientRect;return new N((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Qe=Ft.linux&&Ft.chrome?window.devicePixelRatio:Ft.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function tn(t){return Ft.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var nn={__proto__:null,on:Be,off:qe,stopPropagation:Ze,disableScrollPropagation:Ye,disableClickPropagation:$e,preventDefault:Ge,stop:Ke,getPropagationPath:Xe,getMousePosition:Je,getWheelDelta:tn,isExternalTarget:en,addListener:Be,removeListener:qe},rn=P.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Le(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Ae(this._el,n),this.fire("step")},_complete:function(){T(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),on=P.extend({options:{crs:G,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=f(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(q(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=he&&Ft.any3d&&!Ft.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Be(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(q(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,i.pan&&i.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Ft.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Ft.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),r=this.getSize().divideBy(2),o=(t instanceof N?t:this.latLngToContainerPoint(t)).subtract(r).multiplyBy(1-1/i),a=this.containerPointToLatLng(r.add(o));return this.setView(a,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():B(t);var n=j(e.paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,n.add(i));if((r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r)===1/0)return{center:t.getCenter(),zoom:r};var o=i.subtract(n).divideBy(2),a=this.project(t.getSouthWest(),r),s=this.project(t.getNorthEast(),r);return{center:this.unproject(a.add(s).divideBy(2).add(o),r),zoom:r}},fitBounds:function(t,e){if(!(t=B(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=j(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new rn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){we(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!Ft.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),r=this.project(t),o=this.getSize(),a=this._zoom;t=q(t),e=void 0===e?a:e;var s=Math.max(o.x,o.y),l=s*this.getZoomScale(a,e),u=r.distanceTo(i)||1,c=1.42,h=c*c;function d(t){var e=(l*l-s*s+(t?-1:1)*h*h*u*u)/(2*(t?l:s)*h*u),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function f(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return f(t)/p(t)}var g=d(0);function v(t){return s*(p(g)/p(g+c*t))}function y(t){return s*(p(g)*m(g+c*t)-f(g))/h}function b(t){return 1-Math.pow(1-t,1.5)}var _=Date.now(),w=(d(1)-g)/c,x=n.duration?1e3*n.duration:1e3*w*.8;function k(){var n=(Date.now()-_)/x,o=b(n)*w;n<=1?(this._flyToFrame=C(k,this),this._move(this.unproject(i.add(r.subtract(i).multiplyBy(y(o)/u)),a),this.getScaleZoom(s/v(o),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),k.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=B(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,B(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=this.project(t),a=this.getPixelBounds(),s=R([a.min.add(n),a.max.subtract(i)]),l=s.getSize();if(!s.contains(o)){this._enforcingBounds=!0;var u=o.subtract(s.getCenter()),c=s.extend(o).getSize().subtract(l);r.x+=u.x<0?-c.x:c.x,r.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),a=i.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new z(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var r=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(r,i.maxZoom):r)}var o={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ge(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ge(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=me("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=B(t),n=j(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(n),u=R(this.project(s,i),this.project(a,i)).getSize(),c=Ft.any3d?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new N(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new I(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(q(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(q(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(q(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(q(t),q(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(q(t)))},mouseEventToContainerPoint:function(t){return Je(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=fe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Be(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ft.any3d,we(t,"leaflet-container"+(Ft.touch?" leaflet-touch":"")+(Ft.retina?" leaflet-retina":"")+(Ft.ielt9?" leaflet-oldie":"")+(Ft.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=pe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Ae(this._mapPane,new N(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(t.markerPane,"leaflet-zoom-hide"),we(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Ae(this._mapPane,new N(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,n)._move(t,e)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ae(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?qe:Be;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Ft.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(r&&!en(o,t))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&De(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var r=n({},t);r.type="preclick",this._fireDOMEvent(r,r.type,i)}var o=this._findEventTargets(t,e);if(i){for(var a=[],s=0;s<i.length;s++)i[s].listens(e,!0)&&a.push(i[s]);o=a.concat(o)}if(o.length){"contextmenu"===e&&Ge(t);var l=o[0],u={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);u.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=c?l.getLatLng():this.layerPointToLatLng(u.layerPoint)}for(s=0;s<o.length;s++)if(o[s].fire(e,u,!0),u.originalEvent._stopped||!1===o[s].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Le(this._mapPane)||new N(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return R([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),r=this.getSize().divideBy(2),o=new I(i.subtract(r),i.add(r)),a=this._getBoundsOffset(o,n,e);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?t:this.unproject(i.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new I(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=R(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),r=i.min.subtract(t.min),o=i.max.subtract(t.max);return new N(this._rebound(r.x,-o.x),this._rebound(r.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=Ft.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=me("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ce,n=this._proxy.style[e];Ee(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ge(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ee(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(r)||(C((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function an(t,e){return new on(t,e)}var sn=E.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return we(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ge(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ln=function(t){return new sn(t)};on.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=me("div",e+"control-container",this._container);function i(i,r){var o=e+i+" "+e+r;t[i+r]=me("div",o,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ge(this._controlCorners[t]);ge(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var un=sn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return sn.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){we(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(we(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=me("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),$e(e),Ye(e);var i=this._section=me("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Be(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var r=this._layersLink=me("a",t+"-toggle",e);r.href="#",r.title="Layers",r.setAttribute("role","button"),Be(r,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ge(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=me("div",t+"-base",i),this._separator=me("div",t+"-separator",i),this._overlaysList=me("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(r((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ve(this._baseLayersList),ve(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,r=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,r+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&r>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),Be(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var o=document.createElement("span");return n.appendChild(o),o.appendChild(e),o.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||r.push(e);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])&&this._map.removeLayer(r[o]);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])||this._map.addLayer(i[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Be(t,"click",Ge),this.expand();var e=this;setTimeout((function(){qe(t,"click",Ge),e._preventClick=!1}))}}),cn=function(t,e,n){return new un(t,e,n)},hn=sn.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=me("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){var o=me("a",n,i);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),$e(o),Be(o,"click",Ke),Be(o,"click",r,this),Be(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(we(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(we(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});on.mergeOptions({zoomControl:!0}),on.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new hn,this.addControl(this.zoomControl))}));var dn=function(t){return new hn(t)},fn=sn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=me("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=me("div",e,n)),t.imperial&&(this._iScale=me("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,r=3.2808399*t;r>5280?(e=r/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(r),this._updateScale(this._iScale,i+" ft",i/r))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),pn=function(t){return new fn(t)},mn='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',gn=sn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ft.inlineSvg?mn+" ":"")+"Leaflet</a>"},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=me("div","leaflet-control-attribution"),$e(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});on.mergeOptions({attributionControl:!0}),on.addInitHook((function(){this.options.attributionControl&&(new gn).addTo(this)}));var vn=function(t){return new gn(t)};sn.Layers=un,sn.Zoom=hn,sn.Scale=fn,sn.Attribution=gn,ln.layers=cn,ln.zoom=dn,ln.scale=pn,ln.attribution=vn;var yn=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});yn.addTo=function(t,e){return t.addHandler(e,this),this};var bn={Events:M},_n=Ft.touch?"touchstart mousedown":"mousedown",wn=P.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Be(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wn._dragging===this&&this.finishDrag(!0),qe(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!_e(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)wn._dragging===this&&this.finishDrag();else if(!(wn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(wn._dragging=this,this._preventOutline&&De(this._element),Pe(),oe(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ie(this._element);this._startPoint=new N(e.clientX,e.clientY),this._startPos=Le(this._element),this._parentScale=Re(n);var i="mousedown"===t.type;Be(document,i?"mousemove":"touchmove",this._onMove,this),Be(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new N(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Ge(t),this._moved||(this.fire("dragstart"),this._moved=!0,we(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),we(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ae(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),qe(document,"mousemove touchmove",this._onMove,this),qe(document,"mouseup touchend touchcancel",this._onUp,this),Ne(),ae();var e=this._moved&&this._moving;this._moving=!1,wn._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function xn(t,e,n){var i,r,o,a,s,l,u,c,h,d=[1,4,2,8];for(r=0,u=t.length;r<u;r++)t[r]._code=jn(t[r],e);for(a=0;a<4;a++){for(c=d[a],i=[],r=0,o=(u=t.length)-1;r<u;o=r++)s=t[r],l=t[o],s._code&c?l._code&c||((h=Dn(l,s,c,e,n))._code=jn(h,e),i.push(h)):(l._code&c&&((h=Dn(l,s,c,e,n))._code=jn(h,e),i.push(h)),i.push(s));t=i}return t}function kn(t,e){var n,i,r,o,a,s,l,u,c;if(!t||0===t.length)throw new Error("latlngs not passed");Fn(t)||(t=t[0]);var h=q([0,0]),d=B(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=Sn(t));var f=t.length,p=[];for(n=0;n<f;n++){var m=q(t[n]);p.push(e.project(q([m.lat-h.lat,m.lng-h.lng])))}for(s=l=u=0,n=0,i=f-1;n<f;i=n++)r=p[n],o=p[i],a=r.y*o.x-o.y*r.x,l+=(r.x+o.x)*a,u+=(r.y+o.y)*a,s+=3*a;c=0===s?p[0]:[l/s,u/s];var g=e.unproject(j(c));return q([g.lat+h.lat,g.lng+h.lng])}function Sn(t){for(var e=0,n=0,i=0,r=0;r<t.length;r++){var o=q(t[r]);e+=o.lat,n+=o.lng,i++}return q([e/i,n/i])}var Cn,Tn={__proto__:null,clipPolygon:xn,polygonCenter:kn,centroid:Sn};function On(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Ln(t=Pn(t,n),n)}function En(t,e,n){return Math.sqrt(Rn(t,e,n,!0))}function An(t,e,n){return Rn(t,e,n)}function Ln(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Mn(t,i,e,0,n-1);var r,o=[];for(r=0;r<n;r++)i[r]&&o.push(t[r]);return o}function Mn(t,e,n,i,r){var o,a,s,l=0;for(a=i+1;a<=r-1;a++)(s=Rn(t[a],t[i],t[r],!0))>l&&(o=a,l=s);l>n&&(e[o]=1,Mn(t,e,n,i,o),Mn(t,e,n,o,r))}function Pn(t,e){for(var n=[t[0]],i=1,r=0,o=t.length;i<o;i++)In(t[i],t[r])>e&&(n.push(t[i]),r=i);return r<o-1&&n.push(t[o-1]),n}function Nn(t,e,n,i,r){var o,a,s,l=i?Cn:jn(t,n),u=jn(e,n);for(Cn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;s=jn(a=Dn(t,e,o=l||u,n,r),n),o===l?(t=a,l=s):(e=a,u=s)}}function Dn(t,e,n,i,r){var o,a,s=e.x-t.x,l=e.y-t.y,u=i.min,c=i.max;return 8&n?(o=t.x+s*(c.y-t.y)/l,a=c.y):4&n?(o=t.x+s*(u.y-t.y)/l,a=u.y):2&n?(o=c.x,a=t.y+l*(c.x-t.x)/s):1&n&&(o=u.x,a=t.y+l*(u.x-t.x)/s),new N(o,a,r)}function jn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function In(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Rn(t,e,n,i){var r,o=e.x,a=e.y,s=n.x-o,l=n.y-a,u=s*s+l*l;return u>0&&((r=((t.x-o)*s+(t.y-a)*l)/u)>1?(o=n.x,a=n.y):r>0&&(o+=s*r,a+=l*r)),s=t.x-o,l=t.y-a,i?s*s+l*l:new N(o,a)}function Fn(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Bn(t){return Fn(t)}function zn(t,e){var n,i,r,o,a,s,l,u;if(!t||0===t.length)throw new Error("latlngs not passed");Fn(t)||(t=t[0]);var c=q([0,0]),h=B(t);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(c=Sn(t));var d=t.length,f=[];for(n=0;n<d;n++){var p=q(t[n]);f.push(e.project(q([p.lat-c.lat,p.lng-c.lng])))}for(n=0,i=0;n<d-1;n++)i+=f[n].distanceTo(f[n+1])/2;if(0===i)u=f[0];else for(n=0,o=0;n<d-1;n++)if(a=f[n],s=f[n+1],(o+=r=a.distanceTo(s))>i){l=(o-i)/r,u=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var m=e.unproject(j(u));return q([m.lat+c.lat,m.lng+c.lng])}var qn={__proto__:null,simplify:On,pointToSegmentDistance:En,closestPointOnSegment:An,clipSegment:Nn,_getEdgeIntersection:Dn,_getBitCode:jn,_sqClosestPointOnSegment:Rn,isFlat:Fn,_flat:Bn,polylineCenter:zn},Hn={project:function(t){return new N(t.lng,t.lat)},unproject:function(t){return new z(t.y,t.x)},bounds:new I([-180,-90],[180,90])},Wn={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),a=o*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),o/2);return i=-n*Math.log(Math.max(s,1e-10)),new N(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=Math.exp(-t.y/i),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=o*Math.sin(s),e=Math.pow((1-e)/(1+e),o/2),s+=u=Math.PI/2-2*Math.atan(a*e)-s;return new z(s*n,t.x*n/i)}},Un={__proto__:null,LonLat:Hn,Mercator:Wn,SphericalMercator:Z},Vn=n({},U,{code:"EPSG:3395",projection:Wn,transformation:function(){var t=.5/(Math.PI*Wn.R);return $(t,.5,-t,.5)}()}),Zn=n({},U,{code:"EPSG:4326",projection:Hn,transformation:$(1/180,1,-1/180,.5)}),Yn=n({},W,{projection:Hn,transformation:$(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=U,W.EPSG3395=Vn,W.EPSG3857=G,W.EPSG900913=K,W.EPSG4326=Zn,W.Simple=Yn;var $n=P.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});on.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return a(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?v(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var r=this._zoomBoundLayers[i].options;t=void 0===r.minZoom?t:Math.min(t,r.minZoom),e=void 0===r.maxZoom?e:Math.max(e,r.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Gn=$n.extend({initialize:function(t,e){var n,i;if(f(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return a(t)}}),Kn=function(t,e){return new Gn(t,e)},Xn=Gn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Gn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Gn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new F;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Jn=function(t,e){return new Xn(t,e)},Qn=E.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var r=j(i),o=j("shadow"===e&&n.shadowAnchor||n.iconAnchor||r&&r.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),r&&(t.style.width=r.x+"px",t.style.height=r.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Ft.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ti(t){return new Qn(t)}var ei=Qn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof ei.imagePath&&(ei.imagePath=this._detectIconPath()),(this.options.imagePath||ei.imagePath)+Qn.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=me("div","leaflet-default-icon-path",document.body),e=pe(t,"background-image")||pe(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ni=yn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new wn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),we(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,o=Le(e._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),l=R(a.min._subtract(s).add(r),a.max._subtract(s).subtract(r));if(!l.contains(o)){var u=j((Math.max(l.max.x,o.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Ae(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(T(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Le(e._icon),r=e._map.layerPointToLatLng(i);n&&Ae(n,i),e._latlng=r,t.latlng=r,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ii=$n.extend({options:{icon:new ei,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){f(this,e),this._latlng=q(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=q(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),we(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Be(n,"focus",this._panOnFocus,this);var r=t.icon.createShadow(this._shadow),o=!1;r!==this._shadow&&(this._removeShadow(),o=!0),r&&(we(r,e),r.alt=""),this._shadow=r,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&qe(this._icon,"focus",this._panOnFocus,this),ge(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ge(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Ae(this._icon,t),this._shadow&&Ae(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(we(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ni)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ni(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&Ce(this._icon,t),this._shadow&&Ce(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?j(e.iconSize):j(0,0),i=e.iconAnchor?j(e.iconAnchor):j(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ri(t,e){return new ii(t,e)}var oi=$n.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return f(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),ai=oi.extend({options:{fill:!0,radius:10},initialize:function(t,e){f(this,e),this._latlng=q(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=q(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return oi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new I(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function si(t,e){return new ai(t,e)}var li=ai.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),f(this,e),this._latlng=q(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:oi.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===U.distance){var r=Math.PI/180,o=this._mRadius/U.R/r,a=n.project([e+o,t]),s=n.project([e-o,t]),l=a.add(s).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(o*r)-Math.sin(e*r)*Math.sin(u*r))/(Math.cos(e*r)*Math.cos(u*r)))/r;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,t-c]).x,this._radiusY=l.y-a.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});function ui(t,e,n){return new li(t,e,n)}var ci=oi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){f(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,r=null,o=Rn,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){var h=o(t,e=l[u-1],n=l[u],!0);h<i&&(i=h,r=o(t,e,n))}return r&&(r.distance=Math.sqrt(i)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return zn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=q(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new F,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Fn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=Fn(t),i=0,r=t.length;i<r;i++)n?(e[i]=q(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new N(t,t);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,r,o=t[0]instanceof z,a=t.length;if(o){for(r=[],i=0;i<a;i++)r[i]=this._map.latLngToLayerPoint(t[i]),n.extend(r[i]);e.push(r)}else for(i=0;i<a;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,r,o,a,s,l=this._parts;for(e=0,i=0,r=this._rings.length;e<r;e++)for(n=0,o=(s=this._rings[e]).length;n<o-1;n++)(a=Nn(s[n],s[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(a[0]),a[1]===s[n+1]&&n!==o-2||(l[i].push(a[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=On(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,r,o,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,o=this._parts.length;n<o;n++)for(i=0,r=(a=(s=this._parts[n]).length)-1;i<a;r=i++)if((e||0!==i)&&En(t,s[r],s[i])<=l)return!0;return!1}});function hi(t,e){return new ci(t,e)}ci._flat=Bn;var di=ci.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return kn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ci.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof z&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ci.prototype._setLatLngs.call(this,t),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new N(e,e);if(t=new I(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,r=0,o=this._rings.length;r<o;r++)(i=xn(this._rings[r],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,r,o,a,s,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(r=0,s=this._parts.length;r<s;r++)for(o=0,a=(l=(e=this._parts[r]).length)-1;o<l;a=o++)n=e[o],i=e[a],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ci.prototype._containsPoint.call(this,t,!0)}});function fi(t,e){return new di(t,e)}var pi=Xn.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=v(t)?t:t.features;if(r){for(e=0,n=r.length;e<n;e++)((i=r[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=mi(t,o);return a?(a.feature=xi(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function mi(t,e){var n,i,r,o,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||vi;if(!s&&!a)return null;switch(a.type){case"Point":return gi(u,t,n=c(s),e);case"MultiPoint":for(r=0,o=s.length;r<o;r++)n=c(s[r]),l.push(gi(u,t,n,e));return new Xn(l);case"LineString":case"MultiLineString":return i=yi(s,"LineString"===a.type?0:1,c),new ci(i,e);case"Polygon":case"MultiPolygon":return i=yi(s,"Polygon"===a.type?1:2,c),new di(i,e);case"GeometryCollection":for(r=0,o=a.geometries.length;r<o;r++){var h=mi({geometry:a.geometries[r],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Xn(l);case"FeatureCollection":for(r=0,o=a.features.length;r<o;r++){var d=mi(a.features[r],e);d&&l.push(d)}return new Xn(l);default:throw new Error("Invalid GeoJSON object.")}}function gi(t,e,n,i){return t?t(e,n):new ii(n,i&&i.markersInheritOptions&&i)}function vi(t){return new z(t[1],t[0],t[2])}function yi(t,e,n){for(var i,r=[],o=0,a=t.length;o<a;o++)i=e?yi(t[o],e-1,n):(n||vi)(t[o]),r.push(i);return r}function bi(t,e){return void 0!==(t=q(t)).alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function _i(t,e,n,i){for(var r=[],o=0,a=t.length;o<a;o++)r.push(e?_i(t[o],Fn(t[o])?0:e-1,n,i):bi(t[o],i));return!e&&n&&r.length>0&&r.push(r[0].slice()),r}function wi(t,e){return t.feature?n({},t.feature,{geometry:e}):xi(e)}function xi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ki={toGeoJSON:function(t){return wi(this,{type:"Point",coordinates:bi(this.getLatLng(),t)})}};function Si(t,e){return new pi(t,e)}ii.include(ki),li.include(ki),ai.include(ki),ci.include({toGeoJSON:function(t){var e=!Fn(this._latlngs);return wi(this,{type:(e?"Multi":"")+"LineString",coordinates:_i(this._latlngs,e?1:0,!1,t)})}}),di.include({toGeoJSON:function(t){var e=!Fn(this._latlngs),n=e&&!Fn(this._latlngs[0]),i=_i(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),wi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Gn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),wi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var r=e.toGeoJSON(t);if(n)i.push(r.geometry);else{var o=xi(r);"FeatureCollection"===o.type?i.push.apply(i,o.features):i.push(o)}}})),n?wi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Ci=Si,Ti=$n.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=B(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ge(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ye(this._image),this},bringToBack:function(){return this._map&&be(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=B(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:me("img");we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=r(this.fire,this,"load"),e.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ee(this._image,n,e)},_reset:function(){var t=this._image,e=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Ae(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){Ce(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Oi=function(t,e,n){return new Ti(t,e,n)},Ei=Ti.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:me("video");if(we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=r(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=n.length>0?i:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var s=me("source");s.src=this._url[a],e.appendChild(s)}}}});function Ai(t,e,n){return new Ei(t,e,n)}var Li=Ti.extend({_initImage:function(){var t=this._image=this._url;we(t,"leaflet-image-layer"),this._zoomAnimated&&we(t,"leaflet-zoom-animated"),this.options.className&&we(t,this.options.className),t.onselectstart=u,t.onmousemove=u}});function Mi(t,e,n){return new Li(t,e,n)}var Pi=$n.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof z||v(t))?(this._latlng=q(t),f(this,e)):(f(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Ce(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Ce(this._container,1),this.bringToFront(),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Ce(this._container,0),this._removeTimeout=setTimeout(r(ge,void 0,this._container),200)):ge(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=q(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ye(this._container),this},bringToBack:function(){return this._map&&be(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Xn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=j(this.options.offset),n=this._getAnchor();this._zoomAnimated?Ae(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}});on.include({_initOverlay:function(t,e,n,i){var r=e;return r instanceof t||(r=new t(i).setContent(e)),n&&r.setLatLng(n),r}}),$n.include({_initOverlay:function(t,e,n,i){var r=n;return r instanceof t?(f(r,i),r._source=this):(r=e&&!i?e:new t(i,this)).setContent(n),r}});var Ni=Pi.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Pi.prototype.openOn.call(this,t)},onAdd:function(t){Pi.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof oi||this._source.on("preclick",Ze))},onRemove:function(t){Pi.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof oi||this._source.off("preclick",Ze))},getEvents:function(){var t=Pi.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=me("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=me("div",t+"-content-wrapper",e);if(this._contentNode=me("div",t+"-content",n),$e(e),Ye(this._contentNode),Be(e,"contextmenu",Ze),this._tipContainer=me("div",t+"-tip-container",e),this._tip=me("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=me("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">&#215;</span>',Be(i,"click",(function(t){Ge(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,r=this.options.maxHeight,o="leaflet-popup-scrolled";r&&i>r?(e.height=r+"px",we(t,o)):xe(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Ae(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(pe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,r=new N(this._containerLeft,-n-this._containerBottom);r._add(Le(this._container));var o=t.layerPointToContainerPoint(r),a=j(this.options.autoPanPadding),s=j(this.options.autoPanPaddingTopLeft||a),l=j(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,h=0;o.x+i+l.x>u.x&&(c=o.x+i-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+n+l.y>u.y&&(h=o.y+n-u.y+l.y),o.y-h-s.y<0&&(h=o.y-s.y),(c||h)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,h]))}},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Di=function(t,e){return new Ni(t,e)};on.mergeOptions({closePopupOnClick:!0}),on.include({openPopup:function(t,e,n){return this._initOverlay(Ni,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),$n.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ni,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Xn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ke(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof oi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var ji=Pi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Pi.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Pi.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Pi.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=me("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,r=this._container,o=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(t),s=this.options.direction,l=r.offsetWidth,u=r.offsetHeight,c=j(this.options.offset),h=this._getAnchor();"top"===s?(e=l/2,n=u):"bottom"===s?(e=l/2,n=0):"center"===s?(e=l/2,n=u/2):"right"===s?(e=0,n=u/2):"left"===s?(e=l,n=u/2):a.x<o.x?(s="right",e=0,n=u/2):(s="left",e=l+2*(c.x+h.x),n=u/2),t=t.subtract(j(e,n,!0)).add(c).add(h),xe(r,"leaflet-tooltip-right"),xe(r,"leaflet-tooltip-left"),xe(r,"leaflet-tooltip-top"),xe(r,"leaflet-tooltip-bottom"),we(r,"leaflet-tooltip-"+s),Ae(r,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Ce(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ii=function(t,e){return new ji(t,e)};on.include({openTooltip:function(t,e,n){return this._initOverlay(ji,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),$n.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ji,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Xn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(Be(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Be(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",(function(){e._openOnceFlag=!1,e._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Ri=Qn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(ve(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=j(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Fi(t){return new Ri(t)}Qn.Default=ei;var Bi=$n.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ft.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ge(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ye(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(be(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof N?t:new N(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),r=0,o=n.length;r<o;r++)e=n[r].style.zIndex,n[r]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ft.ielt9){Ce(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var r=this._tiles[i];if(r.current&&r.loaded){var o=Math.min(1,(t-r.loaded)/200);Ce(r.el,o),o<1?e=!0:(r.active?n=!0:this._onOpaqueTile(r),r.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=me("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ge(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],r=this._map;return i||((i=this._levels[t]={}).el=me("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,r.getCenter(),r.getZoom()),u(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ge(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var r=Math.floor(t/2),o=Math.floor(e/2),a=n-1,s=new N(+r,+o);s.z=+a;var l=this._tileCoordsToKey(s),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>i&&this._retainParent(r,o,a,i))},_retainChildren:function(t,e,n,i){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var a=new N(r,o);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(r,o,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var r=Math.round(e);r=void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom?void 0:this._clampZoom(r);var o=this.options.updateWhenZooming&&r!==this._tileZoom;i&&!o||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),r=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();Ft.any3d?Ee(t.el,r,i):Ae(t.el,r)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),r=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*i);return new I(r.subtract(o),r.add(o))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),r=this._pxBoundsToTileRange(i),o=r.getCenter(),a=[],s=this.options.keepBuffer,l=new I(r.getBottomLeft().subtract([s,-s]),r.getTopRight().add([s,-s]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new N(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=r.min.y;h<=r.max.y;h++)for(var d=r.min.x;d<=r.max.x;d++){var f=new N(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:a.push(f)}}if(a.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<a.length;d++)this._addTile(a[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return B(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),r=i.add(n);return[e.unproject(i,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new F(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new N(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ge(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){we(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Ft.ielt9&&this.options.opacity<1&&Ce(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&C(r(this._tileReady,this,t,null,o)),Ae(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(Ce(n.el,0),T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(we(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ft.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new N(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new I(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function zi(t){return new Bi(t)}var qi=Bi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&Ft.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Be(n,"load",r(this._tileOnLoad,this,e,n)),Be(n,"error",r(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Ft.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Ft.ielt9?setTimeout(r(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,!e.complete)){e.src=b;var n=this._tiles[t].coords;ge(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",b),Bi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==b))return Bi.prototype._tileReady.call(this,t,e,n)}});function Hi(t,e){return new qi(t,e)}var Wi=qi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var r in e)r in this.options||(i[r]=e[r]);var o=(e=f(this,e)).detectRetina&&Ft.retina?2:1,a=this.getTileSize();i.width=a.x*o,i.height=a.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,qi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=R(n.project(e[0]),n.project(e[1])),r=i.min,o=i.max,a=(this._wmsVersion>=1.3&&this._crs===Zn?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),s=qi.prototype.getTileUrl.call(this,t);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Ui(t,e){return new Wi(t,e)}qi.WMS=Wi,Hi.wms=Ui;var Vi=$n.extend({options:{padding:.1},initialize:function(t){f(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),we(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),o=i.multiplyBy(-n).add(r).subtract(this._map._getNewPixelOrigin(t,e));Ft.any3d?Ee(this._container,o,n):Ae(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new I(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zi=Vi.extend({options:{tolerance:0},getEvents:function(){var t=Vi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Vi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Be(t,"mousemove",this._onMouseMove,this),Be(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Be(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,ge(this._container),qe(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Ft.retina?2:1;Ae(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ft.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Vi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),r=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;r.push(e)}t.options._dashArray=r}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,r,o,a=t._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),n=0;n<s;n++){for(i=0,r=a[n].length;i<r;i++)o=a[n][i],l[i?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),r=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==r&&(n.save(),n.scale(1,r)),n.beginPath(),n.arc(e.x,e.y/r,i,0,2*Math.PI,!1),1!==r&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),r=this._drawFirst;r;r=r.next)(e=r.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(we(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(r((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Yi(t){return Ft.canvas?new Zi(t):null}var $i=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gi={_initContainer:function(){this._container=me("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Vi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=$i("shape");we(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=$i("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ge(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e||(e=t._stroke=$i("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=$i("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ye(t._container)},_bringToBack:function(t){be(t._container)}},Ki=Ft.vml?$i:X,Xi=Vi.extend({_initContainer:function(){this._container=Ki("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ki("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ge(this._container),qe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vi.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Ae(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ki("path");t.options.className&&we(e,t.options.className),t.options.interactive&&we(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ge(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ye(t._path)},_bringToBack:function(t){be(t._path)}});function Ji(t){return Ft.svg||Ft.vml?new Xi(t):null}Ft.vml&&Xi.include(Gi),on.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Yi(t)||Ji(t)}});var Qi=di.extend({initialize:function(t,e){di.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function tr(t,e){return new Qi(t,e)}Xi.create=Ki,Xi.pointsToPath=J,pi.geometryToLayer=mi,pi.coordsToLatLng=vi,pi.coordsToLatLngs=yi,pi.latLngToCoords=bi,pi.latLngsToCoords=_i,pi.getFeature=wi,pi.asFeature=xi,on.mergeOptions({boxZoom:!0});var er=yn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Be(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){qe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ge(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),oe(),Pe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Be(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=me("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new I(this._point,this._startPoint),n=e.getSize();Ae(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ge(this._box),xe(this._container,"leaflet-crosshair")),ae(),Ne(),qe(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var e=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});on.addInitHook("addHandler","boxZoom",er),on.mergeOptions({doubleClickZoom:!0});var nr=yn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,r=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});on.addInitHook("addHandler","doubleClickZoom",nr),on.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ir=yn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new wn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=B(this._map.options.maxBounds);this._offsetLimit=R(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,r=(i-e+n)%t+e-n,o=(i+e+n)%t-e-n,a=Math.abs(r+n)<Math.abs(o+n)?r:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=r.multiplyBy(a/o),l=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=s.multiplyBy(u/l),h=u/(n.inertiaDeceleration*a),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),C((function(){e.panBy(d,{duration:h,easeLinearity:a,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});on.addInitHook("addHandler","dragging",ir),on.mergeOptions({keyboard:!0,keyboardPanDelta:80});var rr=yn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Be(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),qe(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},r=this.keyCodes;for(e=0,n=r.left.length;e<n;e++)i[r.left[e]]=[-1*t,0];for(e=0,n=r.right.length;e<n;e++)i[r.right[e]]=[t,0];for(e=0,n=r.down.length;e<n;e++)i[r.down[e]]=[0,t];for(e=0,n=r.up.length;e<n;e++)i[r.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},r=this.keyCodes;for(e=0,n=r.zoomIn.length;e<n;e++)i[r.zoomIn[e]]=t;for(e=0,n=r.zoomOut.length;e<n;e++)i[r.zoomOut[e]]=-t},_addHooks:function(){Be(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){qe(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=j(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(j(e),i.options.maxBounds)),i.options.worldCopyJump){var r=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(r)}else i.panBy(e)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Ke(t)}}});on.addInitHook("addHandler","keyboard",rr),on.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var or=yn.extend({addHooks:function(){Be(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){qe(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=tn(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),i),Ke(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,o=n?Math.ceil(r/n)*n:r,a=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});on.addInitHook("addHandler","scrollWheelZoom",or);var ar=600;on.mergeOptions({tapHold:Ft.touchNative&&Ft.safari&&Ft.mobile,tapTolerance:15});var sr=yn.extend({addHooks:function(){Be(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){qe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new N(e.clientX,e.clientY),this._holdTimeout=setTimeout(r((function(){this._cancel(),this._isTapValid()&&(Be(document,"touchend",Ge),Be(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),ar),Be(document,"touchend touchcancel contextmenu",this._cancel,this),Be(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){qe(document,"touchend",Ge),qe(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),qe(document,"touchend touchcancel contextmenu",this._cancel,this),qe(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new N(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});on.addInitHook("addHandler","tapHold",sr),on.mergeOptions({touchZoom:Ft.touch,bounceAtZoomLimits:!0});var lr=yn.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),Be(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),qe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Be(document,"touchmove",this._onTouchMove,this),Be(document,"touchend touchcancel",this._onTouchEnd,this),Ge(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var s=r(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=C(s,this,!0),Ge(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),qe(document,"touchmove",this._onTouchMove,this),qe(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});on.addInitHook("addHandler","touchZoom",lr),on.BoxZoom=er,on.DoubleClickZoom=nr,on.Drag=ir,on.Keyboard=rr,on.ScrollWheelZoom=or,on.TapHold=sr,on.TouchZoom=lr,t.Bounds=I,t.Browser=Ft,t.CRS=W,t.Canvas=Zi,t.Circle=li,t.CircleMarker=ai,t.Class=E,t.Control=sn,t.DivIcon=Ri,t.DivOverlay=Pi,t.DomEvent=nn,t.DomUtil=Fe,t.Draggable=wn,t.Evented=P,t.FeatureGroup=Xn,t.GeoJSON=pi,t.GridLayer=Bi,t.Handler=yn,t.Icon=Qn,t.ImageOverlay=Ti,t.LatLng=z,t.LatLngBounds=F,t.Layer=$n,t.LayerGroup=Gn,t.LineUtil=qn,t.Map=on,t.Marker=ii,t.Mixin=bn,t.Path=oi,t.Point=N,t.PolyUtil=Tn,t.Polygon=di,t.Polyline=ci,t.Popup=Ni,t.PosAnimation=rn,t.Projection=Un,t.Rectangle=Qi,t.Renderer=Vi,t.SVG=Xi,t.SVGOverlay=Li,t.TileLayer=qi,t.Tooltip=ji,t.Transformation=Y,t.Util=O,t.VideoOverlay=Ei,t.bind=r,t.bounds=R,t.canvas=Yi,t.circle=ui,t.circleMarker=si,t.control=ln,t.divIcon=Fi,t.extend=n,t.featureGroup=Jn,t.geoJSON=Si,t.geoJson=Ci,t.gridLayer=zi,t.icon=ti,t.imageOverlay=Oi,t.latLng=q,t.latLngBounds=B,t.layerGroup=Kn,t.map=an,t.marker=ri,t.point=j,t.polygon=fi,t.polyline=hi,t.popup=Di,t.rectangle=tr,t.setOptions=f,t.stamp=a,t.svg=Ji,t.svgOverlay=Mi,t.tileLayer=Hi,t.tooltip=Ii,t.transformation=$,t.version=e,t.videoOverlay=Ai;var ur=window.L;t.noConflict=function(){return window.L=ur,this},window.L=t}(e)},1574:function(t,e,n){var i,r=n(8287).hp;"undefined"!=typeof self&&self,i=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),r=n(18),o=n(19),a=n(45),s=n(46),l=n(47),u=n(48),c=n(49),h=n(12),d=n(32),f=n(33),p=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:i.default,Format:r.default,Leaf:o.default,Embed:u.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:c.default,Attributor:{Attribute:h.default,Class:d.default,Style:f.default,Store:p.default}};e.default=g},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return r(e,t),e}(Error);e.ParchmentError=o;var a,s={},l={},u={},c={};function h(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var i=(t.getAttribute("class")||"").split(/\s+/);for(var r in i)if(n=l[i[r]])break;n=n||u[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=h(t);if(null==n)throw new o("Unable to create "+t+" blot");var i=n,r=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e);return new i(r,e)},e.find=function t(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:i?t(n.parentNode,i):null},e.query=h,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map((function(e){return t(e)}));var i=e[0];if("string"!=typeof i.blotName&&"string"!=typeof i.attrName)throw new o("Invalid definition");if("abstract"===i.blotName)throw new o("Cannot register abstract class");return c[i.blotName||i.attrName]=i,"string"==typeof i.keyName?s[i.keyName]=i:(null!=i.className&&(l[i.className]=i),null!=i.tagName&&(Array.isArray(i.tagName)?i.tagName=i.tagName.map((function(t){return t.toUpperCase()})):i.tagName=i.tagName.toUpperCase(),(Array.isArray(i.tagName)?i.tagName:[i.tagName]).forEach((function(t){null!=u[t]&&null!=i.className||(u[t]=i)})))),i}},function(t,e,n){var i=n(51),r=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(r(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(i){(t(i)?e:n).push(i)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],i=a.iterator(this.ops),r=0;r<e&&i.hasNext();){var o;r<t?o=i.next(t-r):(o=i.next(e-r),n.push(o)),r+=a.length(o)}return new l(n)},l.prototype.compose=function(t){var e=a.iterator(this.ops),n=a.iterator(t.ops),i=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===e.peekType()&&e.peekLength()<=s;)s-=e.peekLength(),i.push(e.next());o.retain-s>0&&n.next(o.retain-s)}for(var u=new l(i);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),h=e.next(c),d=n.next(c);if("number"==typeof d.retain){var f={};"number"==typeof h.retain?f.retain=c:f.insert=h.insert;var p=a.attributes.compose(h.attributes,d.attributes,"number"==typeof h.retain);if(p&&(f.attributes=p),u.push(f),!n.hasNext()&&r(u.ops[u.ops.length-1],f)){var m=new l(e.rest());return u.concat(m).chop()}}else"number"==typeof d.delete&&"number"==typeof h.retain&&u.push(d)}return u.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new l,u=i(n[0],n[1],e),c=a.iterator(this.ops),h=a.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.INSERT:n=Math.min(h.peekLength(),e),o.push(h.next(n));break;case i.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case i.EQUAL:n=Math.min(c.peekLength(),h.peekLength(),e);var s=c.next(n),l=h.next(n);r(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}e-=n}})),o.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),i=new l,r=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(u<0)i.push(n.next());else if(u>0)i.push(n.next(u));else{if(!1===t(i,n.next(1).attributes||{},r))return;r+=1,i=new l}}i.length()>0&&t(i,{},r)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),i=a.iterator(t.ops),r=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())r.push(i.next());else{var o=Math.min(n.peekLength(),i.peekLength()),s=n.next(o),u=i.next(o);if(s.delete)continue;u.delete?r.push(u):r.retain(o,a.attributes.transform(s.attributes,u.attributes,e))}else r.retain(a.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),i=0;n.hasNext()&&i<=t;){var r=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(i<t||!e)&&(t+=r),i+=r):t-=Math.min(r,t-i)}return t},t.exports=l},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===i.call(t)},s=function(t){if(!t||"[object Object]"!==i.call(t))return!1;var e,r=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!o)return!1;for(e in t);return void 0===e||n.call(t,e)},l=function(t,e){r&&"__proto__"===e.name?r(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(o)return o(t,e).value}return t[e]};t.exports=function t(){var e,n,i,r,o,c,h=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof h&&(p=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<f;++d)if(null!=(e=arguments[d]))for(n in e)i=u(h,n),h!==(r=u(e,n))&&(p&&r&&(s(r)||(o=a(r)))?(o?(o=!1,c=i&&a(i)?i:[]):c=i&&s(i)?i:{},l(h,{name:n,newValue:t(p,c,r)})):void 0!==r&&l(h,{name:n,newValue:r}));return h}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=h(n(3)),a=h(n(2)),s=h(n(0)),l=h(n(16)),u=h(n(6)),c=h(n(7));function h(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return d(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),i(e,[{key:"attach",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=s.default.query(t,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,i){this.format(n,i)}},{key:"insertAt",value:function(t,n,i){if("string"==typeof n&&n.endsWith("\n")){var o=s.default.create(g.blotName);this.parent.insertBefore(o,0===t?this:this.next),o.insertAt(0,n.slice(0,-1))}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i)}}]),e}(s.default.Embed);m.scope=s.default.Scope.BLOCK_BLOT;var g=function(t){function e(t){d(this,e);var n=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return p(e,t),i(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce((function(t,e){return 0===e.length()?t:t.insert(e.value(),v(e))}),new a.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,i,o){n<=0||(s.default.query(i,s.default.Scope.BLOCK)?t+n===this.length()&&this.format(i,o):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),i,o),this.cache={})}},{key:"insertAt",value:function(t,n,i){if(null!=i)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(t<this.length()-1||null==this.children.tail?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;o.reduce((function(t,e){return(s=s.split(t,!0)).insertAt(0,e),e.length}),t+a.length)}}},{key:"insertBefore",value:function(t,n){var i=this.children.head;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),i instanceof l.default&&i.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var i=this.clone();return 0===t?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var o=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(s.default.Block);function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:v(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[u.default,s.default.Embed,c.default],e.bubbleFormats=v,e.BlockEmbed=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();n(50);var a=g(n(2)),s=g(n(14)),l=g(n(8)),u=g(n(9)),c=g(n(0)),h=n(15),d=g(h),f=g(n(3)),p=g(n(10)),m=g(n(34));function g(t){return t&&t.__esModule?t:{default:t}}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=(0,p.default)("quill"),b=function(){function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=_(e,i),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new d.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var i=n.selection.lastRange,r=i&&0===i.length?i.index:void 0;w.call(n,(function(){return n.editor.update(null,e,r)}),t)}));var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+r+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&y.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach((function(i){n.register(i,t[i],e)}))}else null==this.imports[t]||i||y.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var i=this,o=x(t,e,n),a=r(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return i.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return w.call(this,(function(){var i=n.getSelection(!0),r=new a.default;if(null==i)return r;if(c.default.query(t,c.default.Scope.BLOCK))r=n.editor.formatLine(i.index,i.length,v({},t,e));else{if(0===i.length)return n.selection.format(t,e),r;r=n.editor.formatText(i.index,i.length,v({},t,e))}return n.setSelection(i,l.default.sources.SILENT),r}),i)}},{key:"formatLine",value:function(t,e,n,i,o){var a,s=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],a=u[2],o=u[3],w.call(this,(function(){return s.editor.formatLine(t,e,a)}),o,t,0)}},{key:"formatText",value:function(t,e,n,i,o){var a,s=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],a=u[2],o=u[3],w.call(this,(function(){return s.editor.formatText(t,e,a)}),o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return w.call(this,(function(){return r.editor.insertEmbed(e,n,i)}),o,e)}},{key:"insertText",value:function(t,e,n,i,o){var a,s=this,l=x(t,0,n,i,o),u=r(l,4);return t=u[0],a=u[2],o=u[3],w.call(this,(function(){return s.editor.insertText(t,e,a)}),o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var i=this,o=x(t,e,n),a=r(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,(function(){return i.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,(function(){t=new a.default(t);var n=e.getLength(),i=e.editor.deleteText(0,n),r=e.editor.applyDelta(t),o=r.ops[r.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),r.delete(1)),i.compose(r)}),n)}},{key:"setSelection",value:function(e,n,i){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=x(e,n,i),a=r(o,4);e=a[0],n=a[1],i=a[3],this.selection.setRange(new h.Range(e,n),i),i!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function _(t,e){if((e=(0,f.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==b.DEFAULTS.theme){if(e.theme=b.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,f.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var i=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=b.import("modules/"+e);return null==n?y.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,f.default)(!0,{},b.DEFAULTS,{modules:i},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function w(t,e,n,i){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var r=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=r&&(!0===n&&(n=r.index),null==i?r=k(r,s,e):0!==i&&(r=k(r,n,i,e)),this.setSelection(r,l.default.sources.SILENT)),s.length()>0){var u,c,h=[l.default.events.TEXT_CHANGE,s,o,e];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(h)),e!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,h)}return s}function x(t,e,n,r,o){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":i(n))?(a=n,o=r):"string"==typeof n&&(null!=r?a[n]=r:o=n),[t,e,a,o=o||l.default.sources.API]}function k(t,e,n,i){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var u=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,i!==l.default.sources.USER)})),c=r(u,2);o=c[0],s=c[1]}else{var d=[t.index,t.index+t.length].map((function(t){return t<e||t===e&&i===l.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)})),f=r(d,2);o=f[0],s=f[1]}return new h.Range(o,s-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},e.expandConfig=_,e.overload=x,e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=s(n(7)),a=s(n(0));function s(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"formatAt",value:function(t,n,i,o){if(e.compare(this.statics.blotName,i)<0&&a.default.query(i,a.default.Scope.BLOT)){var s=this.isolate(t,n);o&&s.wrap(i,o)}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,o)}},{key:"optimize",value:function(t){if(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var i=e.order.indexOf(t),r=e.order.indexOf(n);return i>=0||r>=0?i-r:t===n?0:t<n?-1:1}}]),e}(a.default.Inline);l.allowedChildren=[l,a.default.Embed,o.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(0),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default.Text);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=a(n(54));function a(t){return t&&t.__esModule?t:{default:t}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,(function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)}))}))}));var l=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",s.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"emit",value:function(){s.log.apply(s,arguments),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];(this.listeners[t.type]||[]).forEach((function(e){var i=e.node,r=e.handler;(t.target===i||i.contains(t.target))&&r.apply(void 0,[t].concat(n))}))}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}(o.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=["error","warn","log","info"],r="warn";function o(t){if(i.indexOf(t)<=i.indexOf(r)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(e=console)[t].apply(e,o)}}function a(t){return i.reduce((function(e,n){return e[n]=o.bind(console,n,t),e}),{})}o.level=a.level=function(t){r=t},e.default=a},function(t,e,n){var i=Array.prototype.slice,r=n(52),o=n(53),a=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var u,c;if(s(t)||s(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t))return!!o(e)&&(t=i.call(t),e=i.call(e),a(t,e,n));if(l(t)){if(!l(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var h=r(t),d=r(e)}catch(t){return!1}if(h.length!=d.length)return!1;for(h.sort(),d.sort(),u=h.length-1;u>=0;u--)if(h[u]!=d[u])return!1;for(u=h.length-1;u>=0;u--)if(c=h[u],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|r:this.scope=i.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=i.query(t,i.Scope.BLOT&(this.scope|i.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=h(n(2)),s=h(n(0)),l=h(n(4)),u=h(n(6)),c=h(n(7));function h(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=function(t){function e(){return d(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),e}(u.default);m.blotName="code",m.tagName="CODE";var g=function(t){function e(){return d(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),r(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new a.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var r=this.descendant(c.default,this.length()-1),a=i(r,1)[0];null!=a&&a.deleteAt(a.length()-1,1),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,i,r){if(0!==n&&null!=s.default.query(i,s.default.Scope.BLOCK)&&(i!==this.statics.blotName||r!==this.statics.formats(this.domNode))){var o=this.newlineIndex(t);if(!(o<0||o>=t+n)){var a=this.newlineIndex(t,!0)+1,l=o-a+1,u=this.isolate(a,l),c=u.next;u.format(i,r),c instanceof e&&c.formatAt(0,t-a+n-l,i,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(c.default,t),o=i(r,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB="  ",e.Code=m,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=v(n(2)),s=v(n(20)),l=v(n(0)),u=v(n(13)),c=v(n(24)),h=n(4),d=v(h),f=v(n(16)),p=v(n(21)),m=v(n(11)),g=v(n(3));function v(t){return t&&t.__esModule?t:{default:t}}var y=/^[ -~]*$/,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return o(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,p.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,p.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var i=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(i,e.attributes)}return t.push(e)}),new a.default)}(t)).reduce((function(t,a){var u=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var f=a.insert;f.endsWith("\n")&&n&&(n=!1,f=f.slice(0,-1)),t>=o&&!f.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,f);var p=e.scroll.line(t),m=r(p,2),v=m[0],y=m[1],b=(0,g.default)({},(0,h.bubbleFormats)(v));if(v instanceof d.default){var _=v.descendant(l.default.Leaf,y),w=r(_,1)[0];b=(0,g.default)(b,(0,h.bubbleFormats)(w))}c=s.default.attributes.diff(b,c)||{}}else if("object"===i(a.insert)){var x=Object.keys(a.insert)[0];if(null==x)return t;e.scroll.insertAt(t,x,a.insert[x])}o+=u}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,u,n,c[n])})),t+u}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(i).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach((function(e){var o=e.length();if(e instanceof u.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,r,i[r])}else e.format(r,i[r]);a-=o}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"formatText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e,r,i[r])})),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach((function(t){var e=r(t,1)[0];e instanceof d.default?n.push(e):e instanceof l.default.Leaf&&i.push(e)})):(n=this.scroll.lines(t,e),i=this.scroll.descendants(l.default.Leaf,t,e));var o=[n,i].map((function(t){if(0===t.length)return{};for(var e=(0,h.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,h.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e.length,r,i[r])})),this.update((new a.default).retain(t).insert(e,(0,p.default)(i)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===d.default.blotName&&!(t.children.length>1)&&t.children.head instanceof f.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),i=this.scroll.line(t+e),o=r(i,2),s=o[0],l=o[1],c=0,h=new a.default;null!=s&&(c=s instanceof u.default?s.newlineIndex(l)-l+1:s.length()-l,h=s.delta().slice(l,l+c-1).insert("\n"));var d=this.getContents(t,e+c).diff((new a.default).insert(n).concat(h)),f=(new a.default).retain(t).concat(d);return this.applyDelta(f)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(y)&&l.default.find(e[0].target)){var r=l.default.find(e[0].target),o=(0,h.bubbleFormats)(r),s=r.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),d=(new a.default).insert(u),f=(new a.default).insert(r.value());t=(new a.default).retain(s).concat(d.diff(f,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new a.default),this.delta=i.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(i.compose(t),this.delta)||(t=i.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,i){return null==t[i]||(e[i]===t[i]?n[i]=e[i]:Array.isArray(e[i])?e[i].indexOf(t[i])<0&&(n[i]=e[i].concat([t[i]])):n[i]=[e[i],t[i]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=u(n(0)),a=u(n(21)),s=u(n(11)),l=u(n(8));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var d=(0,u(n(10)).default)("quill:selection"),f=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;h(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var i=this;h(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){i.mouseDown||setTimeout(i.update.bind(i,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&i.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(i.hasFocus()){var t=i.getNativeRange();null!=t&&t.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{i.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,r=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;i.setNativeRange(r,o,a,s)}})),this.update(l.default.sources.SILENT)}return r(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=o.default.find(n.start.node,!1);if(null==i)return;if(i instanceof o.default.Leaf){var r=i.split(n.start.offset);i.parent.insertBefore(this.cursor,r)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=this.scroll.leaf(t),a=i(o,2),s=a[0],l=a[1];if(null==s)return null;var u=s.position(l,!0),c=i(u,2);r=c[0],l=c[1];var h=document.createRange();if(e>0){h.setStart(r,l);var d=this.scroll.leaf(t+e),f=i(d,2);if(s=f[0],l=f[1],null==s)return null;var p=s.position(l,!0),m=i(p,2);return r=m[0],l=m[1],h.setEnd(r,l),h.getBoundingClientRect()}var g="left",v=void 0;return r instanceof Text?(l<r.data.length?(h.setStart(r,l),h.setEnd(r,l+1)):(h.setStart(r,l-1),h.setEnd(r,l),g="right"),v=h.getBoundingClientRect()):(v=s.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return d.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map((function(t){var n=i(t,2),r=n[0],a=n[1],s=o.default.find(r,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(r,a)})),a=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(r)));return new f(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var a,s=e.scroll.leaf(t),l=i(s,2),u=l[0],c=l[1],h=u.position(c,0!==n),d=i(h,2);a=d[0],c=d[1],r.push(a,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,r)),a=i(o,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));s=i(l,1)[0]}if(null!=a&&null!=s){var u=t.getBoundingClientRect();n.top<u.top?t.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",t,e,n,i),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||r||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||i!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(i=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,i),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),d.info("setRange",t),null!=t){var i=this.rangeToNative(t);this.setNativeRange.apply(this,c(i).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),r=i(n,2),o=r[0],u=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var h,d=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),t!==l.default.sources.SILENT&&(h=this.emitter).emit.apply(h,d)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=f,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(0),s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"insertInto",value:function(t,n){0===t.children.length?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(((i=a)&&i.__esModule?i:{default:i}).default.Embed);s.blotName="break",s.tagName="BR",e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(44),a=n(30),s=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return r(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=u(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof s.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var i=this.children.find(n),r=i[0],o=i[1];return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,o]:r instanceof e?r.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=Number.MAX_VALUE);var r=[],o=i;return this.children.forEachAt(n,i,(function(n,i,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&r.push(n),n instanceof e&&(r=r.concat(n.descendants(t,i,o))),o-=a})),r},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,i){this.children.forEachAt(t,e,(function(t,e,r){t.formatAt(e,r,n,i)}))},e.prototype.insertAt=function(t,e,n){var i=this.children.find(t),r=i[0],o=i[1];if(r)r.insertAt(o,e,n);else{var a=null==n?s.create("text",e):s.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new s.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var i=this.children.find(t,n),r=i[0],o=i[1],a=[[this,t]];return r instanceof e?a.concat(r.path(o,n)):(null!=r&&a.push([r,o]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,i,r){t=t.split(i,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,i=[],r=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(i.push.apply(i,t.addedNodes),r.push.apply(r,t.removedNodes))})),r.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=s.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),i.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=s.find(t.nextSibling));var i=u(t);i.next==e&&null!=i.next||(null!=i.parent&&i.parent.removeChild(n),n.insertBefore(i,e||void 0))}))},e}(a.default);function u(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),a=n(31),s=n(17),l=n(1),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new a.default(n.domNode),n}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=l.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var i=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(i),i},e.prototype.update=function(e,n){var i=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===i.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,i){var r=t.prototype.wrap.call(this,n,i);return r instanceof e&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},e}(s.default);e.default=u},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(30),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){var i=n(11),r=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var i=r(!0,{},e);for(var o in n||(i=Object.keys(i).reduce((function(t,e){return null!=i[e]&&(t[e]=i[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(i[o]=t[o]);return Object.keys(i).length>0?i:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var i=Object.keys(e).reduce((function(n,i){return void 0===t[i]&&(n[i]=e[i]),n}),{});return Object.keys(i).length>0?i:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,i=o.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(i)}return[]},t.exports=o},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,i;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{i=Promise}catch(t){i=function(){}}function o(a,l,u,c,h){"object"==typeof l&&(u=l.depth,c=l.prototype,h=l.includeNonEnumerable,l=l.circular);var d=[],f=[],p=void 0!==r;return void 0===l&&(l=!0),void 0===u&&(u=1/0),function a(u,m){if(null===u)return null;if(0===m)return u;var g,v;if("object"!=typeof u)return u;if(t(u,e))g=new e;else if(t(u,n))g=new n;else if(t(u,i))g=new i((function(t,e){u.then((function(e){t(a(e,m-1))}),(function(t){e(a(t,m-1))}))}));else if(o.__isArray(u))g=[];else if(o.__isRegExp(u))g=new RegExp(u.source,s(u)),u.lastIndex&&(g.lastIndex=u.lastIndex);else if(o.__isDate(u))g=new Date(u.getTime());else{if(p&&r.isBuffer(u))return g=r.allocUnsafe?r.allocUnsafe(u.length):new r(u.length),u.copy(g),g;t(u,Error)?g=Object.create(u):void 0===c?(v=Object.getPrototypeOf(u),g=Object.create(v)):(g=Object.create(c),v=c)}if(l){var y=d.indexOf(u);if(-1!=y)return f[y];d.push(u),f.push(g)}for(var b in t(u,e)&&u.forEach((function(t,e){var n=a(e,m-1),i=a(t,m-1);g.set(n,i)})),t(u,n)&&u.forEach((function(t){var e=a(t,m-1);g.add(e)})),u){var _;v&&(_=Object.getOwnPropertyDescriptor(v,b)),_&&null==_.set||(g[b]=a(u[b],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(b=0;b<w.length;b++){var x=w[b];(!(S=Object.getOwnPropertyDescriptor(u,x))||S.enumerable||h)&&(g[x]=a(u[x],m-1),S.enumerable||Object.defineProperty(g,x,{enumerable:!1}))}}if(h){var k=Object.getOwnPropertyNames(u);for(b=0;b<k.length;b++){var S,C=k[b];(S=Object.getOwnPropertyDescriptor(u,C))&&S.enumerable||(g[C]=a(u[C],m-1),Object.defineProperty(g,C,{enumerable:!1}))}}return g}(a,u)}function a(t){return Object.prototype.toString.call(t)}function s(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return o.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},o.__objToStr=a,o.__isDate=function(t){return"object"==typeof t&&"[object Date]"===a(t)},o.__isArray=function(t){return"object"==typeof t&&"[object Array]"===a(t)},o.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===a(t)},o.__getRegExpFlags=s,o}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=f(n(0)),s=f(n(8)),l=n(4),u=f(l),c=f(n(16)),h=f(n(13)),d=f(n(25));function f(t){return t&&t.__esModule?t:{default:t}}function p(t){return t instanceof u.default||t instanceof l.BlockEmbed}var m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.emitter=n.emitter,Array.isArray(n.whitelist)&&(i.whitelist=n.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),i.domNode.addEventListener("DOMNodeInserted",(function(){})),i.optimize(),i.enable(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var r=this.line(t),a=i(r,2),s=a[0],u=a[1],d=this.line(t+n),f=i(d,1)[0];if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=f&&s!==f&&u>0){if(s instanceof l.BlockEmbed||f instanceof l.BlockEmbed)return void this.optimize();if(s instanceof h.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===f)return void this.optimize()}else if(f instanceof h.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var g=f.children.head instanceof c.default?null:f.children.head;s.moveChildren(f,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,i,r){(null==this.whitelist||this.whitelist[i])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,r),this.optimize())}},{key:"insertAt",value:function(t,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==i||null==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,i)}else{var s=a.default.create(n,i);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var i=a.default.create(this.statics.defaultChild);i.appendChild(t),t=i}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){return function t(e,n,i){var r=[],o=i;return e.children.forEachAt(n,i,(function(e,n,i){p(e)?r.push(e):e instanceof a.default.Container&&(r=r.concat(t(e,n,o))),o-=i})),r}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[u.default,l.BlockEmbed,d.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=m(n(21)),s=m(n(11)),l=m(n(3)),u=m(n(2)),c=m(n(20)),h=m(n(0)),d=m(n(5)),f=m(n(10)),p=m(n(9));function m(t){return t&&t.__esModule?t:{default:t}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=(0,f.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.bindings={},Object.keys(i.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&i.options.bindings[e]&&i.addBinding(i.options.bindings[e])})),i.addBinding({key:e.keys.ENTER,shiftKey:null},S),i.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(i.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},w),i.addBinding({key:e.keys.DELETE},{collapsed:!0},x)):(i.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),i.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},x)),i.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},k),i.addBinding({key:e.keys.DELETE},{collapsed:!1},k),i.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),i.listen(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"match",value:function(t,e){return e=O(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),o(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=O(t);if(null==i||null==i.key)return v.warn("Attempted to add invalid keyboard binding",i);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),i=(0,l.default)(i,e,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var u=t.quill.getLine(l.index),c=r(u,2),d=c[0],f=c[1],p=t.quill.getLeaf(l.index),m=r(p,2),g=m[0],v=m[1],y=0===l.length?[g,v]:t.quill.getLeaf(l.index+l.length),b=r(y,2),_=b[0],w=b[1],x=g instanceof h.default.Text?g.value().slice(0,v):"",k=_ instanceof h.default.Text?_.value().slice(w):"",S={collapsed:0===l.length,empty:0===l.length&&d.length()<=1,format:t.quill.getFormat(l),offset:f,prefix:x,suffix:k};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==S.collapsed)return!1;if(null!=e.empty&&e.empty!==S.empty)return!1;if(null!=e.offset&&e.offset!==S.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==S.format[t]})))return!1}else if("object"===i(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=S.format[t]:!1===e.format[t]?null==S.format[t]:(0,s.default)(e.format[t],S.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(S.prefix)||null!=e.suffix&&!e.suffix.test(S.suffix)||!0===e.handler.call(t,l,S))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function _(t,e){var n,i=t===b.keys.LEFT?"prefix":"suffix";return g(n={key:t,shiftKey:e,altKey:null},i,/^$/),g(n,"handler",(function(n){var i=n.index;t===b.keys.RIGHT&&(i+=n.length+1);var o=this.quill.getLeaf(i);return!(r(o,1)[0]instanceof h.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index-1,d.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index+n.length+1,d.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),i=r(n,1)[0],o={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=r(a,1)[0];if(null!=s&&s.length()>1){var l=i.formats(),u=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(l,u)||{}}}var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-h,h,d.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-h,h,o,d.default.sources.USER),this.quill.focus()}}function x(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var i={},o=0,a=this.quill.getLine(t.index),s=r(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),u=r(l,1)[0];if(u){var h=s.formats(),f=this.quill.getFormat(t.index,1);i=c.default.attributes.diff(h,f)||{},o=u.length()}}this.quill.deleteText(t.index,n,d.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index+o-1,n,i,d.default.sources.USER)}}function k(t){var e=this.quill.getLines(t),n={};if(e.length>1){var i=e[0].formats(),r=e[e.length-1].formats();n=c.default.attributes.diff(r,i)||{}}this.quill.deleteText(t,d.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,d.default.sources.USER),this.quill.setSelection(t.index,d.default.sources.SILENT),this.quill.focus()}function S(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var i=Object.keys(e.format).reduce((function(t,n){return h.default.query(n,h.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",i,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==i[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],d.default.sources.USER))}))}function C(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=h.default.query("code-block"),i=e.index,o=e.length,a=this.quill.scroll.descendant(n,i),s=r(a,2),l=s[0],u=s[1];if(null!=l){var c=this.quill.getIndex(l),f=l.newlineIndex(u,!0)+1,p=l.newlineIndex(c+u+o),m=l.domNode.textContent.slice(f,p).split("\n");u=0,m.forEach((function(e,r){t?(l.insertAt(f+u,n.TAB),u+=n.TAB.length,0===r?i+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(f+u,n.TAB.length),u-=n.TAB.length,0===r?i-=n.TAB.length:o-=n.TAB.length),u+=e.length+1})),this.quill.update(d.default.sources.USER),this.quill.setSelection(i,o,d.default.sources.SILENT)}}}}function T(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],d.default.sources.USER)}}}function O(t){if("string"==typeof t||"number"==typeof t)return O({key:t});if("object"===(void 0===t?"undefined":i(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:T("bold"),italic:T("italic"),underline:T("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",d.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",d.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",d.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,d.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,d.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,d.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,d.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],a=(0,l.default)({},i.formats(),{list:"checked"}),s=(new u.default).retain(t.index).insert("\n",a).retain(i.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),i=r(n,2),o=i[0],a=i[1],s=(new u.default).retain(t.index).insert("\n",e.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,i=this.quill.getLine(t.index),o=r(i,2),a=o[0],s=o[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",d.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(c,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,d.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],a=(new u.default).retain(t.index+i.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,d.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=l(n(0)),s=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.selection=n,i.textNode=document.createTextNode(e.CONTENTS),i.domNode.appendChild(i.textNode),i._length=0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"value",value:function(){}}]),o(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var i=this,o=0;null!=i&&i.statics.scope!==a.default.Scope.BLOCK_BLOT;)o+=i.offset(i.parent),i=i.parent;null!=i&&(this._length=e.CONTENTS.length,i.optimize(),i.formatAt(o,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),r=void 0,o=void 0,l=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var u=[t,n.start.offset,n.end.offset];r=u[0],o=u[1],l=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var c=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof s.default?(r=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var h=[o,l].map((function(t){return Math.max(0,Math.min(r.data.length,t-1))})),d=i(h,2);return o=d[0],l=d[1],{startNode:r,startOffset:o,endNode:r,endOffset:l}}}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var i=this.restore();i&&(e.range=i)}}},{key:"value",value:function(){return""}}]),e}(a.default.Embed);u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n(0)),r=n(4),o=a(r);function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default.Container);s.allowedChildren=[o.default,r.BlockEmbed,s],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(0),s=(i=a)&&i.__esModule?i:{default:i},l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"value",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):n}}]),e}(s.default.Attributor.Style),u=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),c=new l("color","color",{scope:s.default.Scope.INLINE});e.ColorAttributor=l,e.ColorClass=u,e.ColorStyle=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(6),s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return l(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}(((i=a)&&i.__esModule?i:{default:i}).default);function l(t,e){var n=document.createElement("a");n.href=t;var i=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(i)>-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=s,e.sanitize=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=s(n(23)),a=s(n(107));function s(t){return t&&t.__esModule?t:{default:t}}var l=0;function u(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return r(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case o.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=a.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var i=t.buildItem(n);e.appendChild(i),!0===n.selected&&t.selectItem(i)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=v(n(0)),r=v(n(5)),o=n(4),a=v(o),s=v(n(16)),l=v(n(25)),u=v(n(24)),c=v(n(35)),h=v(n(6)),d=v(n(22)),f=v(n(7)),p=v(n(55)),m=v(n(42)),g=v(n(23));function v(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":h.default,"blots/scroll":d.default,"blots/text":f.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":g.default}),i.default.register(a.default,s.default,u.default,h.default,d.default,f.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t){this.domNode=t,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new i.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return i.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var o=this.isolate(t,e);if(null!=i.query(n,i.Scope.BLOT)&&r)o.wrap(n,r);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var a=i.create(this.statics.scope);o.wrap(a),a.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?i.create("text",e):i.create(e,n),o=this.split(t);this.parent.insertBefore(r,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[i.DATA_KEY]&&delete this.domNode[i.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?i.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?i.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),r=n(32),o=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=i.default.keys(this.domNode),n=r.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof i.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var i=e.attributes[n].value(e.domNode);t.format(n,i)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return i(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();r.DEFAULTS={modules:{}},r.themes={default:r},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var l="\ufeff",u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(t){n.contentNode.appendChild(t)})),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,i=t.data.split(l).join("");if(t===this.leftGuard)if(this.prev instanceof a.default){var r=this.prev.length();this.prev.insertAt(r,i),e={startNode:this.prev.domNode,startOffset:r+i.length}}else n=document.createTextNode(i),this.parent.insertBefore(o.default.create(n),this),e={startNode:n,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,i),e={startNode:this.next.domNode,startOffset:i.length}):(n=document.createTextNode(i),this.parent.insertBefore(o.default.create(n),this.next),e={startNode:n,startOffset:i.length}));return t.data=l,e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var i=n.restore(t.target);i&&(e.range=i)}}))}}]),e}(o.default.Embed);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},a={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new o.default.Attributor.Attribute("align","align",a),l=new o.default.Attributor.Class("align","ql-align",a),u=new o.default.Attributor.Style("align","text-align",a);e.AlignAttribute=s,e.AlignClass=l,e.AlignStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},a=n(26),s=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new a.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});e.BackgroundClass=s,e.BackgroundStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},a={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},s=new o.default.Attributor.Attribute("direction","dir",a),l=new o.default.Attributor.Class("direction","ql-direction",a),u=new o.default.Attributor.Style("direction","direction",a);e.DirectionAttribute=s,e.DirectionClass=l,e.DirectionStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(0),s=(i=a)&&i.__esModule?i:{default:i},l={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},u=new s.default.Attributor.Class("font","ql-font",l),c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"value",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(s.default.Attributor.Style),h=new c("font","font-family",l);e.FontStyle=h,e.FontClass=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},a=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=a,e.SizeStyle=s},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(0)),o=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.lastRecorded=0,i.ignoreChange=!1,i.clear(),i.quill.on(o.default.events.EDITOR_CHANGE,(function(t,e,n,r){t!==o.default.events.TEXT_CHANGE||i.ignoreChange||(i.options.userOnly&&r!==o.default.sources.USER?i.transform(e):i.record(e,n))})),i.quill.keyboard.addBinding({key:"Z",shortKey:!0},i.undo.bind(i)),i.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},i.redo.bind(i)),/Win/i.test(navigator.platform)&&i.quill.keyboard.addBinding({key:"Y",shortKey:!0},i.redo.bind(i)),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],o.default.sources.USER),this.ignoreChange=!1;var i=l(n[t]);this.quill.setSelection(i)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.redo.compose(t)}else this.lastRecorded=i;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=r.default.query(t,r.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=p(n(3)),a=p(n(2)),s=p(n(8)),l=p(n(23)),u=p(n(34)),c=p(n(59)),h=p(n(60)),d=p(n(28)),f=p(n(61));function p(t){return t&&t.__esModule?t:{default:t}}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],_=[!1,"serif","monospace"],w=["1","2","3",!1],x=["small",!1,"large","huge"],k=function(t){function e(t,n){m(this,e);var i=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==i.tooltip||i.tooltip.root.contains(n.target)||document.activeElement===i.tooltip.textbox||i.quill.hasFocus()||i.tooltip.hide(),null!=i.pickers&&i.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),i}return v(e,t),i(e,[{key:"addModule",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var i=t.value||"";null!=i&&e[n][i]&&(t.innerHTML=e[n][i])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&C(t,y),new h.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&C(t,b,"background"===n?"#ffffff":"#000000"),new c.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?C(t,_):t.classList.contains("ql-header")?C(t,w):t.classList.contains("ql-size")&&C(t,x)),new d.default(t)})),this.quill.on(s.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),e}(u.default);k.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var i=t.quill.getSelection(!0);t.quill.updateContents((new a.default).retain(i.index).delete(i.length).insert({image:n.target.result}),s.default.sources.USER),t.quill.setSelection(i.index+1,s.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var S=function(t){function e(t,n){m(this,e);var i=g(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.textbox=i.root.querySelector('input[type="text"]'),i.listen(),i}return v(e,t),i(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){l.default.match(e,"enter")?(t.save(),e.preventDefault()):l.default.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var i=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=i;break;case"video":n=(e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var r=this.quill.getSelection(!0);if(null!=r){var o=r.index+r.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",s.default.sources.USER),this.quill.setSelection(o+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(f.default);function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var i=document.createElement("option");e===n?i.setAttribute("selected","selected"):i.setAttribute("value",e),t.appendChild(i)}))}e.BaseTooltip=S,e.default=k},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,i=this.iterator();n=i();){var r=n.length();if(t<r||e&&t===r&&(null==n.next||0!==n.next.length()))return[n,t];t-=r}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var i,r=this.find(t),o=r[0],a=t-r[1],s=this.iterator(o);(i=s())&&a<t+e;){var l=i.length();t>a?n(i,t-a,Math.min(e,a+l-t)):n(i,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,i=this.iterator();n=i();)e=t(e,n);return e},t}();e.default=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,i,r){this.update(),t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){this.update(),t.prototype.insertAt.call(this,e,n,i)},e.prototype.optimize=function(e,n){var i=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==i&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(l),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(l),r=(u=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e,n){var i=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==i&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,i){var r=this;n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,i,r){null!=this.formats()[i]||a.query(i,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var r=this.next;r instanceof e&&r.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(i,r.formats())&&(r.moveChildren(this),r.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var i=a.query(e.blotName).tagName;if(n.tagName!==i)return t.formats.call(this,n)},e.prototype.format=function(n,i){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,i,r){null!=a.query(i,a.Scope.BLOCK)?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){if(null==i||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,i);else{var r=this.split(e),o=a.create(n,i);r.parent.insertBefore(o,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,i,r){0===e&&n===this.length()?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,i){null==i?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,i)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){"use strict";var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),i=n.length>>>0,r=arguments[1],o=0;o<i;o++)if(e=n[o],t.call(r,e,o,n))return e}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){var n=-1,i=1,r=0;function o(t,e,c){if(t==e)return t?[[r,t]]:[];(c<0||t.length<c)&&(c=null);var d=s(t,e),f=t.substring(0,d);d=l(t=t.substring(d),e=e.substring(d));var p=t.substring(t.length-d),m=function(t,e){var u;if(!t)return[[i,e]];if(!e)return[[n,t]];var c=t.length>e.length?t:e,h=t.length>e.length?e:t,d=c.indexOf(h);if(-1!=d)return u=[[i,c.substring(0,d)],[r,h],[i,c.substring(d+h.length)]],t.length>e.length&&(u[0][0]=u[2][0]=n),u;if(1==h.length)return[[n,t],[i,e]];var f=function(t,e){var n=t.length>e.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length<n.length)return null;function r(t,e,n){for(var i,r,o,a,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,h="";-1!=(c=e.indexOf(u,c+1));){var d=s(t.substring(n),e.substring(c)),f=l(t.substring(0,n),e.substring(0,c));h.length<f+d&&(h=e.substring(c-f,c)+e.substring(c,c+d),i=t.substring(0,n-f),r=t.substring(n+d),o=e.substring(0,c-f),a=e.substring(c+d))}return 2*h.length>=t.length?[i,r,o,a,h]:null}var o,a,u,c,h,d=r(n,i,Math.ceil(n.length/4)),f=r(n,i,Math.ceil(n.length/2));if(!d&&!f)return null;o=f?d&&d[4].length>f[4].length?d:f:d,t.length>e.length?(a=o[0],u=o[1],c=o[2],h=o[3]):(c=o[0],h=o[1],a=o[2],u=o[3]);var p=o[4];return[a,u,c,h,p]}(t,e);if(f){var p=f[0],m=f[1],g=f[2],v=f[3],y=f[4],b=o(p,g),_=o(m,v);return b.concat([[r,y]],_)}return function(t,e){for(var r=t.length,o=e.length,s=Math.ceil((r+o)/2),l=s,u=2*s,c=new Array(u),h=new Array(u),d=0;d<u;d++)c[d]=-1,h[d]=-1;c[l+1]=0,h[l+1]=0;for(var f=r-o,p=f%2!=0,m=0,g=0,v=0,y=0,b=0;b<s;b++){for(var _=-b+m;_<=b-g;_+=2){for(var w=l+_,x=(O=_==-b||_!=b&&c[w-1]<c[w+1]?c[w+1]:c[w-1]+1)-_;O<r&&x<o&&t.charAt(O)==e.charAt(x);)O++,x++;if(c[w]=O,O>r)g+=2;else if(x>o)m+=2;else if(p&&(C=l+f-_)>=0&&C<u&&-1!=h[C]&&O>=(S=r-h[C]))return a(t,e,O,x)}for(var k=-b+v;k<=b-y;k+=2){for(var S,C=l+k,T=(S=k==-b||k!=b&&h[C-1]<h[C+1]?h[C+1]:h[C-1]+1)-k;S<r&&T<o&&t.charAt(r-S-1)==e.charAt(o-T-1);)S++,T++;if(h[C]=S,S>r)y+=2;else if(T>o)v+=2;else if(!p){var O;if((w=l+f-k)>=0&&w<u&&-1!=c[w])if(x=l+(O=c[w])-w,O>=(S=r-S))return a(t,e,O,x)}}}return[[n,t],[i,e]]}(t,e)}(t=t.substring(0,t.length-d),e=e.substring(0,e.length-d));return f&&m.unshift([r,f]),p&&m.push([r,p]),u(m),null!=c&&(m=function(t,e){var i=function(t,e){if(0===e)return[r,t];for(var i=0,o=0;o<t.length;o++){var a=t[o];if(a[0]===n||a[0]===r){var s=i+a[1].length;if(e===s)return[o+1,t];if(e<s){t=t.slice();var l=e-i,u=[a[0],a[1].slice(0,l)],c=[a[0],a[1].slice(l)];return t.splice(o,1,u,c),[o+1,t]}i=s}}throw new Error("cursor_pos is out of bounds!")}(t,e),o=i[1],a=i[0],s=o[a],l=o[a+1];if(null==s)return t;if(s[0]!==r)return t;if(null!=l&&s[1]+l[1]===l[1]+s[1])return o.splice(a,2,l,s),h(o,a,2);if(null!=l&&0===l[1].indexOf(s[1])){o.splice(a,2,[l[0],s[1]],[0,s[1]]);var u=l[1].slice(s[1].length);return u.length>0&&o.splice(a+2,0,[l[0],u]),h(o,a,3)}return t}(m,c)),m=function(t){for(var e=!1,o=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},a=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},s=2;s<t.length;s+=1)t[s-2][0]===r&&a(t[s-2][1])&&t[s-1][0]===n&&o(t[s-1][1])&&t[s][0]===i&&o(t[s][1])&&(e=!0,t[s-1][1]=t[s-2][1].slice(-1)+t[s-1][1],t[s][1]=t[s-2][1].slice(-1)+t[s][1],t[s-2][1]=t[s-2][1].slice(0,-1));if(!e)return t;var l=[];for(s=0;s<t.length;s+=1)t[s][1].length>0&&l.push(t[s]);return l}(m)}function a(t,e,n,i){var r=t.substring(0,n),a=e.substring(0,i),s=t.substring(n),l=e.substring(i),u=o(r,a),c=o(s,l);return u.concat(c)}function s(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n<r;)t.substring(o,r)==e.substring(o,r)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r}function l(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n<r;)t.substring(t.length-r,t.length-o)==e.substring(e.length-r,e.length-o)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r}function u(t){t.push([r,""]);for(var e,o=0,a=0,c=0,h="",d="";o<t.length;)switch(t[o][0]){case i:c++,d+=t[o][1],o++;break;case n:a++,h+=t[o][1],o++;break;case r:a+c>1?(0!==a&&0!==c&&(0!==(e=s(d,h))&&(o-a-c>0&&t[o-a-c-1][0]==r?t[o-a-c-1][1]+=d.substring(0,e):(t.splice(0,0,[r,d.substring(0,e)]),o++),d=d.substring(e),h=h.substring(e)),0!==(e=l(d,h))&&(t[o][1]=d.substring(d.length-e)+t[o][1],d=d.substring(0,d.length-e),h=h.substring(0,h.length-e))),0===a?t.splice(o-c,a+c,[i,d]):0===c?t.splice(o-a,a+c,[n,h]):t.splice(o-a-c,a+c,[n,h],[i,d]),o=o-a-c+(a?1:0)+(c?1:0)+1):0!==o&&t[o-1][0]==r?(t[o-1][1]+=t[o][1],t.splice(o,1)):o++,c=0,a=0,h="",d=""}""===t[t.length-1][1]&&t.pop();var f=!1;for(o=1;o<t.length-1;)t[o-1][0]==r&&t[o+1][0]==r&&(t[o][1].substring(t[o][1].length-t[o-1][1].length)==t[o-1][1]?(t[o][1]=t[o-1][1]+t[o][1].substring(0,t[o][1].length-t[o-1][1].length),t[o+1][1]=t[o-1][1]+t[o+1][1],t.splice(o-1,1),f=!0):t[o][1].substring(0,t[o+1][1].length)==t[o+1][1]&&(t[o-1][1]+=t[o+1][1],t[o][1]=t[o][1].substring(t[o+1][1].length)+t[o+1][1],t.splice(o+1,1),f=!0)),o++;f&&u(t)}var c=o;function h(t,e,n){for(var i=e+n-1;i>=0&&i>=e-1;i--)if(i+1<t.length){var r=t[i],o=t[i+1];r[0]===o[1]&&t.splice(i,2,[r[0],r[1]+o[1]])}return t}c.INSERT=i,c.DELETE=n,c.EQUAL=r,t.exports=c},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function i(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?i:r).supported=i,e.unsupported=r},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t,e){var n=i?i+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,s=new Array(a);o<a;o++)s[o]=r[o].fn;return s},a.prototype.emit=function(t,e,n,r,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var l,u,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,o),!0;case 6:return c.fn.call(c.context,e,n,r,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,r);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},a.prototype.on=function(t,e,n){var r=new o(e,n||this),a=i?i+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):(this._events[a]=r,this._eventsCount++),this},a.prototype.once=function(t,e,n){var r=new o(e,n||this,!0),a=i?i+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):(this._events[a]=r,this._eventsCount++),this},a.prototype.removeListener=function(t,e,n,o){var a=i?i+t:t;if(!this._events[a])return this;if(!e)return 0==--this._eventsCount?this._events=new r:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==e||o&&!s.once||n&&s.context!==n||(0==--this._eventsCount?this._events=new r:delete this._events[a]);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==e||o&&!s[l].once||n&&s[l].context!==n)&&u.push(s[l]);u.length?this._events[a]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new r:delete this._events[a]}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new r:delete this._events[e])):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=i,a.EventEmitter=a,void 0!==t&&(t.exports=a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=b(n(3)),s=b(n(2)),l=b(n(0)),u=b(n(5)),c=b(n(10)),h=b(n(9)),d=n(36),f=n(37),p=b(n(13)),m=n(26),g=n(38),v=n(39),y=n(40);function b(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=(0,c.default)("quill:clipboard"),x="__ql-matcher",k=[[Node.TEXT_NODE,R],[Node.TEXT_NODE,j],["br",function(t,e){return A(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,function(t,e){var n={},i=t.style||{};return i.fontStyle&&"italic"===E(t).fontStyle&&(n.italic=!0),i.fontWeight&&(E(t).fontWeight.startsWith("bold")||parseInt(E(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=O(e,n)),parseFloat(i.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!A(e,"\n"))return e;for(var i=-1,r=t.parentNode;!r.classList.contains("ql-clipboard");)"list"===(l.default.query(r)||{}).blotName&&(i+=1),r=r.parentNode;return i<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:i}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new s.default}]],S=[d.AlignAttribute,g.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),C=[d.AlignStyle,f.BackgroundStyle,m.ColorStyle,g.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),T=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.root.addEventListener("paste",i.onPaste.bind(i)),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],k.concat(i.options.matchers).forEach((function(t){var e=r(t,2),o=e[0],a=e[1];(n.matchVisual||a!==I)&&i.addMatcher(o,a)})),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},p.default.blotName,e[p.default.blotName]))}var i=this.prepareMatching(),o=r(i,2),a=o[0],l=o[1],u=M(this.container,a,l);return A(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new s.default).retain(u.length()-1).delete(1))),w.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var i=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(i),n),this.quill.setSelection(t+i.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),i=(new s.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){i=i.concat(e.convert()).delete(n.length),e.quill.updateContents(i,u.default.sources.USER),e.quill.setSelection(i.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=r,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(i){var o=r(i,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[x]=t[x]||[],t[x].push(s)}))}})),[e,n]}}]),e}(h.default);function O(t,e,n){return"object"===(void 0===e?"undefined":i(e))?Object.keys(e).reduce((function(t,n){return O(t,n,e[n])}),t):t.reduce((function(t,i){return i.attributes&&i.attributes[e]?t.push(i):t.insert(i.insert,(0,a.default)({},_({},e,n),i.attributes))}),new s.default)}function E(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function A(t,e){for(var n="",i=t.ops.length-1;i>=0&&n.length<e.length;--i){var r=t.ops[i];if("string"!=typeof r.insert)break;n=r.insert+n}return n.slice(-1*e.length)===e}function L(t){if(0===t.childNodes.length)return!1;var e=E(t);return["block","list-item"].indexOf(e.display)>-1}function M(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new s.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(i,r){var o=M(r,e,n);return r.nodeType===t.ELEMENT_NODE&&(o=e.reduce((function(t,e){return e(r,t)}),o),o=(r[x]||[]).reduce((function(t,e){return e(r,t)}),o)),i.concat(o)}),new s.default):new s.default}function P(t,e,n){return O(n,t,!0)}function N(t,e){var n=l.default.Attributor.Attribute.keys(t),i=l.default.Attributor.Class.keys(t),r=l.default.Attributor.Style.keys(t),o={};return n.concat(i).concat(r).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=S[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=C[e])||n.attrName!==e&&n.keyName!==e||(n=C[e],o[n.attrName]=n.value(t)||void 0))})),Object.keys(o).length>0&&(e=O(e,o)),e}function D(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var i={},r=n.value(t);null!=r&&(i[n.blotName]=r,e=(new s.default).insert(i,n.formats(t)))}else"function"==typeof n.formats&&(e=O(e,n.blotName,n.formats(t)));return e}function j(t,e){return A(e,"\n")||(L(t)||e.length()>0&&t.nextSibling&&L(t.nextSibling))&&e.insert("\n"),e}function I(t,e){if(L(t)&&null!=t.nextElementSibling&&!A(e,"\n\n")){var n=t.offsetHeight+parseFloat(E(t).marginTop)+parseFloat(E(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function R(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!E(t.parentNode).whiteSpace.startsWith("pre")){var i=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,i.bind(i,!0)),(null==t.previousSibling&&L(t.parentNode)||null!=t.previousSibling&&L(t.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==t.nextSibling&&L(t.parentNode)||null!=t.nextSibling&&L(t.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return e.insert(n)}T.DEFAULTS={matchers:[],matchVisual:!0},e.default=T,e.matchAttributor=N,e.matchBlot=D,e.matchNewline=j,e.matchSpacing=I,e.matchText=R},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(6),s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(((i=a)&&i.__esModule?i:{default:i}).default);s.blotName="bold",s.tagName=["STRONG","B"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=c(n(2)),a=c(n(0)),s=c(n(5)),l=c(n(10)),u=c(n(9));function c(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var d=(0,l.default)("quill:toolbar"),f=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r,o=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");m(a,o.options.container),t.container.parentNode.insertBefore(a,t.container),o.container=a}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach((function(t){o.addHandler(t,o.options.handlers[t])})),[].forEach.call(o.container.querySelectorAll("button, select"),(function(t){o.attach(t)})),o.quill.on(s.default.events.EDITOR_CHANGE,(function(t,e){t===s.default.events.SELECTION_CHANGE&&o.update(e)})),o.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){var t=o.quill.selection.getRange(),e=i(t,1)[0];o.update(e)})),o):(r=d.error("Container required for toolbar",o.options),h(o,r))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void d.warn("ignoring attaching to disabled format",n,t);if(null==a.default.query(n))return void d.warn("ignoring attaching to nonexistent format",n,t)}var r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,(function(r){var l=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var u=t.options[t.selectedIndex];l=!u.hasAttribute("selected")&&(u.value||!1)}else l=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();e.quill.focus();var c=e.quill.selection.getRange(),h=i(c,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,l);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(l=prompt("Enter "+n)))return;e.quill.updateContents((new o.default).retain(h.index).delete(h.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,l)),s.default.sources.USER)}else e.quill.format(n,l,s.default.sources.USER);e.update(h)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var r=i(n,2),o=r[0],a=r[1];if("SELECT"===a.tagName){var s=void 0;if(null==t)s=null;else if(null==e[o])s=a.querySelector("option[selected]");else if(!Array.isArray(e[o])){var l=e[o];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),s=a.querySelector('option[value="'+l+'"]')}null==s?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(null==t)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var u=e[o]===a.getAttribute("value")||null!=e[o]&&e[o].toString()===a.getAttribute("value")||null==e[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",u)}else a.classList.toggle("ql-active",null!=e[o])}))}}]),e}(u.default);function p(t,e,n){var i=document.createElement("button");i.setAttribute("type","button"),i.classList.add("ql-"+e),null!=n&&(i.value=n),t.appendChild(i)}function m(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)p(n,t);else{var e=Object.keys(t)[0],i=t[e];Array.isArray(i)?function(t,e,n){var i=document.createElement("select");i.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),i.appendChild(e)})),t.appendChild(i)}(n,e,i):p(n,e,i)}})),t.appendChild(n)}))}f.DEFAULTS={},f.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=a.default.query(e,a.default.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,s.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",s.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",t,s.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),i=parseInt(n.indent||0);if("+1"===t||"-1"===t){var r="+1"===t?1:-1;"rtl"===n.direction&&(r*=-1),this.quill.format("indent",i+r,s.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,s.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",t,s.default.sources.USER)}}},e.default=f,e.addControls=m},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(28),s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.label.innerHTML=n,i.container.classList.add("ql-color-picker"),[].slice.call(i.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"buildItem",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var i=this.label.querySelector(".ql-color-label"),r=t&&t.getAttribute("data-value")||"";i&&("line"===i.tagName?i.style.stroke=r:i.style.fill=r)}}]),e}(((i=a)&&i.__esModule?i:{default:i}).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(28),s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.container.classList.add("ql-icon-picker"),[].forEach.call(i.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=n[t.getAttribute("data-value")||""]})),i.defaultItem=i.container.querySelector(".ql-selected"),i.selectItem(i.defaultItem),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(((i=a)&&i.__esModule?i:{default:i}).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(e,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){i.root.style.marginTop=-1*i.quill.root.scrollTop+"px"})),this.hide()}return i(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var i=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),o=0;if(r.right>i.right&&(o=i.right-r.right,this.root.style.left=e+o+"px"),r.left<i.left&&(o=i.left-r.left,this.root.style.left=e+o+"px"),r.bottom>i.bottom){var a=r.bottom-r.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=f(n(3)),s=f(n(8)),l=n(43),u=f(l),c=f(n(27)),h=n(15),d=f(n(41));function f(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(t){function e(t,n){p(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var i=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.container.classList.add("ql-snow"),i}return g(e,t),o(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),d.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),d.default),this.tooltip=new b(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e}(u.default);y.DEFAULTS=(0,a.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){p(this,e);var i=m(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.preview=i.root.querySelector("a.ql-preview"),i}return g(e,t),o(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,s.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(s.default.events.SELECTION_CHANGE,(function(e,n,r){if(null!=e){if(0===e.length&&r===s.default.sources.USER){var o=t.quill.scroll.descendant(c.default,e.index),a=i(o,2),l=a[0],u=a[1];if(null!=l){t.linkRange=new h.Range(e.index-u,l.length());var d=c.default.formats(l.domNode);return t.preview.textContent=d,t.preview.setAttribute("href",d),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(l.BaseTooltip);b.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=j(n(29)),r=n(36),o=n(38),a=n(64),s=j(n(65)),l=j(n(66)),u=n(67),c=j(u),h=n(37),d=n(26),f=n(39),p=n(40),m=j(n(56)),g=j(n(68)),v=j(n(27)),y=j(n(69)),b=j(n(70)),_=j(n(71)),w=j(n(72)),x=j(n(73)),k=n(13),S=j(k),C=j(n(74)),T=j(n(75)),O=j(n(57)),E=j(n(41)),A=j(n(28)),L=j(n(59)),M=j(n(60)),P=j(n(61)),N=j(n(108)),D=j(n(62));function j(t){return t&&t.__esModule?t:{default:t}}i.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":h.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":h.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":p.SizeStyle},!0),i.default.register({"formats/align":r.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":h.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":f.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":S.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":k.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":x.default,"formats/list/item":u.ListItem,"modules/formula":C.default,"modules/syntax":T.default,"modules/toolbar":O.default,"themes/bubble":N.default,"themes/snow":D.default,"ui/icons":E.default,"ui/picker":A.default,"ui/icon-picker":M.default,"ui/color-picker":L.default,"ui/tooltip":P.default},!0),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(0),s=(i=a)&&i.__esModule?i:{default:i},l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var i=this.value(t)||0;n="+1"===n?i+1:i-1}return 0===n?(this.remove(t),!0):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(s.default.Attributor.Class),u=new l("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(4),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="blockquote",o.tagName="blockquote",e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(4),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(((i=o)&&i.__esModule?i:{default:i}).default);a.blotName="header",a.tagName=["H1","H2","H3","H4","H5","H6"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=l(n(0)),a=l(n(4)),s=l(n(25));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var d=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,t),i(e,[{key:"format",value:function(t,n){t!==f.blotName||n?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:r(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(a.default);d.blotName="list-item",d.tagName="LI";var f=function(t){function e(t){u(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),i=function(e){if(e.target.parentNode===t){var i=n.statics.formats(t),r=o.default.find(e.target);"checked"===i?r.format("list","unchecked"):"unchecked"===i&&r.format("list","checked")}};return t.addEventListener("touchstart",i),t.addEventListener("mousedown",i),n}return h(e,t),i(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",i=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||i.setAttribute("data-checked","checked"===t),i}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),i(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof d)r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var i=null==n?this.length():n.offset(this),o=this.split(i);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);f.blotName="list",f.scope=o.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[d],e.ListItem=d,e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(56),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="italic",o.tagName=["EM","I"],e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(6),s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(((i=a)&&i.__esModule?i:{default:i}).default);s.blotName="script",s.tagName=["SUB","SUP"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="strike",o.tagName="S",e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((i=r)&&i.__esModule?i:{default:i}).default);o.blotName="underline",o.tagName="U",e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(0),s=(i=a)&&i.__esModule?i:{default:i},l=n(27),u=["alt","height","width"],c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.default.Embed);c.blotName="image",c.tagName="IMG",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(4),s=n(27),l=(i=s)&&i.__esModule?i:{default:i},u=["height","width"],c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);c.blotName="video",c.className="ql-video",c.tagName="IFRAME",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=l(n(35)),a=l(n(5)),s=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var d=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,t),i(e,null,[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(o.default);d.blotName="formula",d.className="ql-formula",d.tagName="SPAN";var f=function(t){function e(){u(this,e);var t=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return h(e,t),i(e,null,[{key:"register",value:function(){a.default.register(d,!0)}}]),e}(s.default);e.FormulaBlot=d,e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=l(n(0)),a=l(n(5)),s=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var d=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,t),i(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(l(n(13)).default);d.className="ql-syntax";var f=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(t){function e(t,n){u(this,e);var i=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof i.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var r=null;return i.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){i.highlight(),r=null}),i.options.interval)})),i.highlight(),i}return h(e,t),i(e,null,[{key:"register",value:function(){a.default.register(f,!0),a.default.register(d,!0)}}]),i(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(d).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}(s.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=d,e.CodeToken=f,e.default=p},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=h(n(3)),a=h(n(8)),s=n(43),l=h(s),u=n(15),c=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(t){function e(t,n){d(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var i=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.container.classList.add("ql-bubble"),i}return p(e,t),r(e,[{key:"extendToolbar",value:function(t){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)}}]),e}(l.default);g.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(t){function e(t,n){d(this,e);var i=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e,n,r){if(t===a.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&r===a.default.sources.USER){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var o=i.quill.getLines(e.index,e.length);if(1===o.length)i.position(i.quill.getBounds(e));else{var s=o[o.length-1],l=i.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-l),h=i.quill.getBounds(new u.Range(l,c));i.position(h)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()})),i}return p(e,t),r(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=v,e.default=g},function(t,e,n){t.exports=n(63)}]).default},t.exports=i()},4302:(t,e,n)=>{var i;t.exports=function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,(function(t){var n=e[a][1][t];return r(n||t)}),u,u.exports,t,e,n,i)}return n[a].exports}for(var o=void 0,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=t.length;n>e;++e)l[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function r(t){var e,n,i,r,o,a,s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[s-2]?2:"="===t[s-1]?1:0,a=new c(3*s/4-o),i=o>0?s-4:s;var l=0;for(e=0,n=0;i>e;e+=4,n+=3)r=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],a[l++]=r>>16&255,a[l++]=r>>8&255,a[l++]=255&r;return 2===o?(r=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,a[l++]=255&r):1===o&&(r=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,a[l++]=r>>8&255,a[l++]=255&r),a}function o(t){return l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}function a(t,e,n){for(var i,r=[],a=e;n>a;a+=3)i=(t[a]<<16)+(t[a+1]<<8)+t[a+2],r.push(o(i));return r.join("")}function s(t){for(var e,n=t.length,i=n%3,r="",o=[],s=16383,u=0,c=n-i;c>u;u+=s)o.push(a(t,u,u+s>c?c:u+s));return 1===i?(e=t[n-1],r+=l[e>>2],r+=l[e<<4&63],r+="=="):2===i&&(e=(t[n-2]<<8)+t[n-1],r+=l[e>>10],r+=l[e>>4&63],r+=l[e<<2&63],r+="="),o.push(r),o.join("")}n.toByteArray=r,n.fromByteArray=s;var l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array;i()},{}],2:[function(t,e,n){},{}],3:[function(t,e,i){(function(e){"use strict";function n(){try{var t=new Uint8Array(1);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(r()<e)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=a.prototype:(null===t&&(t=new a(e)),t.length=e),t}function a(t,e,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,e,n)}function s(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,n,i):"string"==typeof e?h(t,e,n):p(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number')}function u(t,e,n,i){return l(e),0>=e?o(t,e):void 0!==n?"string"==typeof i?o(t,e).fill(n,i):o(t,e).fill(n):o(t,e)}function c(t,e){if(l(e),t=o(t,0>e?0:0|m(e)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function h(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return(t=o(t,0|v(e,n))).write(e,n),t}function d(t,e){var n=0|m(e.length);t=o(t,n);for(var i=0;n>i;i+=1)t[i]=255&e[i];return t}function f(t,e,n,i){if(e.byteLength,0>n||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return e=void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i),a.TYPED_ARRAY_SUPPORT?(t=e).__proto__=a.prototype:t=d(t,e),t}function p(t,e){if(a.isBuffer(e)){var n=0|m(e.length);return 0===(t=o(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||G(e.length)?o(t,0):d(t,e);if("Buffer"===e.type&&J(e.data))return d(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function m(t){if(t>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),a.alloc(+t)}function v(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return U(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,n){var i=!1;if((void 0===e||0>e)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if((e>>>=0)>=(n>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return L(this,e,n);case"binary":return M(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function b(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function _(t,e,n,i){function r(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,a=t.length,s=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,a/=2,s/=2,n/=2}for(var l=-1,u=0;a>n+u;u++)if(r(t,n+u)===r(e,-1===l?0:u-l)){if(-1===l&&(l=u),u-l+1===s)return(n+l)*o}else-1!==l&&(u-=u-l),l=-1;return-1}function w(t,e,n,i){n=Number(n)||0;var r=t.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=e.length;if(o%2!=0)throw new Error("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;i>a;a++){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function x(t,e,n,i){return $(U(e,t.length-n),t,n,i)}function k(t,e,n,i){return $(V(e),t,n,i)}function S(t,e,n,i){return k(t,e,n,i)}function C(t,e,n,i){return $(Y(e),t,n,i)}function T(t,e,n,i){return $(Z(e,t.length-n),t,n,i)}function O(t,e,n){return 0===e&&n===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;n>r;){var o,a,s,l,u=t[r],c=null,h=u>239?4:u>223?3:u>191?2:1;if(n>=r+h)switch(h){case 1:128>u&&(c=u);break;case 2:128==(192&(o=t[r+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=t[r+1],a=t[r+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(55296>l||l>57343)&&(c=l);break;case 4:o=t[r+1],a=t[r+2],s=t[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&1114112>l&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),r+=h}return A(i)}function A(t){var e=t.length;if(Q>=e)return String.fromCharCode.apply(String,t);for(var n="",i=0;e>i;)n+=String.fromCharCode.apply(String,t.slice(i,i+=Q));return n}function L(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;n>r;r++)i+=String.fromCharCode(127&t[r]);return i}function M(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;n>r;r++)i+=String.fromCharCode(t[r]);return i}function P(t,e,n){var i=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>i)&&(n=i);for(var r="",o=e;n>o;o++)r+=W(t[o]);return r}function N(t,e,n){for(var i=t.slice(e,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function D(t,e,n){if(t%1!=0||0>t)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,n,i,r,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||o>e)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function I(t,e,n,i){0>e&&(e=65535+e+1);for(var r=0,o=Math.min(t.length-n,2);o>r;r++)t[n+r]=(e&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function R(t,e,n,i){0>e&&(e=4294967295+e+1);for(var r=0,o=Math.min(t.length-n,4);o>r;r++)t[n+r]=e>>>8*(i?r:3-r)&255}function F(t,e,n,i,r,o){if(n+i>t.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function B(t,e,n,i,r){return r||F(t,e,n,4,34028234663852886e22,-34028234663852886e22),X.write(t,e,n,i,23,4),n+4}function z(t,e,n,i,r){return r||F(t,e,n,8,17976931348623157e292,-17976931348623157e292),X.write(t,e,n,i,52,8),n+8}function q(t){if((t=H(t).replace(tt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function W(t){return 16>t?"0"+t.toString(16):t.toString(16)}function U(t,e){e=e||1/0;for(var n,i=t.length,r=null,o=[],a=0;i>a;a++){if((n=t.charCodeAt(a))>55295&&57344>n){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(56320>n){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,128>n){if((e-=1)<0)break;o.push(n)}else if(2048>n){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}function Z(t,e){for(var n,i,r,o=[],a=0;a<t.length&&!((e-=2)<0);a++)i=(n=t.charCodeAt(a))>>8,r=n%256,o.push(r),o.push(i);return o}function Y(t){return K.toByteArray(q(t))}function $(t,e,n,i){for(var r=0;i>r&&!(r+n>=e.length||r>=t.length);r++)e[r+n]=t[r];return r}function G(t){return t!=t}var K=t("base64-js"),X=t("ieee754"),J=t("isarray");i.Buffer=a,i.SlowBuffer=g,i.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),i.kMaxLength=r(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,n){return s(null,t,e,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,n){return u(null,t,e,n)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,r=0,o=Math.min(n,i);o>r;++r)if(t[r]!==e[r]){n=t[r],i=e[r];break}return i>n?-1:n>i?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!J(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;n++)e+=t[n].length;var i=a.allocUnsafe(e),r=0;for(n=0;n<t.length;n++){var o=t[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,r),r+=o.length}return i},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;t>e;e+=2)b(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;t>e;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):y.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=i.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,e,n,i,r){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),0>e||n>t.length||0>i||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(e>>>=0),l=Math.min(o,s),u=this.slice(i,r),c=t.slice(e,n),h=0;l>h;++h)if(u[h]!==c[h]){o=u[h],s=c[h];break}return s>o?-1:o>s?1:0},a.prototype.indexOf=function(t,e,n){if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:_(this,t,e,n);if("number"==typeof t)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):_(this,[t],e,n);throw new TypeError("val must be string, number or Buffer")},a.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},a.prototype.write=function(t,e,n,i){if(void 0===e)i="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)i=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return k(this,t,e,n);case"binary":return S(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(t,e){var n,i=this.length;if(0>(t=~~t)?0>(t+=i)&&(t=0):t>i&&(t=i),0>(e=void 0===e?i:~~e)?0>(e+=i)&&(e=0):e>i&&(e=i),t>e&&(e=t),a.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=a.prototype;else{var r=e-t;n=new a(r,void 0);for(var o=0;r>o;o++)n[o]=this[o+t]}return n},a.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var i=this[t],r=1,o=0;++o<e&&(r*=256);)i+=this[t+o]*r;return i},a.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var i=this[t+--e],r=1;e>0&&(r*=256);)i+=this[t+--e]*r;return i},a.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var i=this[t],r=1,o=0;++o<e&&(r*=256);)i+=this[t+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var i=e,r=1,o=this[t+--i];i>0&&(r*=256);)o+=this[t+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,i){t=+t,e|=0,n|=0,i||j(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[e]=255&t;++o<n&&(r*=256);)this[e+o]=t/r&255;return e+n},a.prototype.writeUIntBE=function(t,e,n,i){t=+t,e|=0,n|=0,i||j(this,t,e,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[e+r]=255&t;--r>=0&&(o*=256);)this[e+r]=t/o&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)0>t&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+n},a.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)0>t&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return z(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return z(this,t,e,!1,n)},a.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r,o=i-n;if(this===t&&e>n&&i>e)for(r=o-1;r>=0;r--)t[r+e]=this[r+n];else if(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(r=0;o>r;r++)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},a.prototype.fill=function(t,e,n,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===t.length){var r=t.charCodeAt(0);256>r&&(t=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(0>e||this.length<e||this.length<n)throw new RangeError("Out of range index");if(e>=n)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;n>o;o++)this[o]=t;else{var s=a.isBuffer(t)?t:U(new a(t,i).toString()),l=s.length;for(o=0;n-e>o;o++)this[o+e]=s[o%l]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:15,isarray:16}],4:[function(t,e,n){"use strict";function i(t){return"function"!=typeof(t=t||{}).codeMirrorInstance||"function"!=typeof t.codeMirrorInstance.defineMode?void 0:(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),void t.codeMirrorInstance.defineMode("spell-checker",(function(e){if(!i.aff_loading){i.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(i.aff_data=n.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},n.send(null)}if(!i.dic_loading){i.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(i.dic_data=o.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',s={token:function(t){var e=t.peek(),n="";if(a.includes(e))return t.next(),null;for(;null!=(e=t.peek())&&!a.includes(e);)n+=e,t.next();return i.typo&&!i.typo.check(n)?"spell-error":null}},l=t.codeMirrorInstance.getMode(e,e.backdrop||"text/plain");return t.codeMirrorInstance.overlayMode(l,s,!0)})))}var r=t("typo-js");i.num_loaded=0,i.aff_loading=!1,i.dic_loading=!1,i.aff_data="",i.dic_data="",i.typo,e.exports=i},{"typo-js":18}],5:[function(t,e,n){var r;r=function(t){"use strict";function e(t){var e=t.getWrapperElement();t.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:e.style.width,height:e.style.height},e.style.width="",e.style.height="auto",e.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",t.refresh()}function n(t){var e=t.getWrapperElement();e.className=e.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=t.state.fullScreenRestore;e.style.width=n.width,e.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),t.refresh()}t.defineOption("fullScreen",!1,(function(i,r,o){o==t.Init&&(o=!1),!o!=!r&&(r?e(i):n(i))}))},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],6:[function(t,e,n){var r;r=function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function n(t){e(t);var n=t.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.className="CodeMirror-placeholder";var i=t.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function i(t){o(t)&&n(t)}function r(t){var i=t.getWrapperElement(),r=o(t);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(t):e(t)}function o(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(n,o,a){var s=a&&a!=t.Init;if(o&&!s)n.on("blur",i),n.on("change",r),n.on("swapDoc",r),r(n);else if(!o&&s){n.off("blur",i),n.off("change",r),n.off("swapDoc",r),e(n);var l=n.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}o&&!n.hasFocus()&&i(n)}))},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],7:[function(t,e,n){var r;r=function(t){"use strict";var e=/^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;t.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return t.Pass;for(var o=r.listSelections(),a=[],s=0;s<o.length;s++){var l=o[s].head,u=r.getStateAfter(l.line),c=!1!==u.list,h=0!==u.quote,d=r.getLine(l.line),f=e.exec(d);if(!o[s].empty()||!c&&!h||!f)return void r.execCommand("newlineAndIndent");if(n.test(d))r.replaceRange("",{line:l.line,ch:0},{line:l.line,ch:l.ch+1}),a[s]="\n";else{var p=f[1],m=f[5],g=i.test(f[2])||f[2].indexOf(">")>=0?f[2]:parseInt(f[3],10)+1+f[4];a[s]="\n"+p+g+m}}r.replaceSelections(a)}},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],8:[function(t,e,n){var r;r=function(t){"use strict";t.overlayMode=function(e,n,i){return{startState:function(){return{base:t.startState(e),overlay:t.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(i){return{base:t.copyState(e,i.base),overlay:t.copyState(n,i.overlay),basePos:i.basePos,baseCur:null,overlayPos:i.overlayPos,overlayCur:null}},token:function(t,r){return(t!=r.streamSeen||Math.min(r.basePos,r.overlayPos)<t.start)&&(r.streamSeen=t,r.basePos=r.overlayPos=t.start),t.start==r.basePos&&(r.baseCur=e.token(t,r.base),r.basePos=t.pos),t.start==r.overlayPos&&(t.pos=t.start,r.overlayCur=n.token(t,r.overlay),r.overlayPos=t.pos),t.pos=Math.min(r.basePos,r.overlayPos),null==r.overlayCur?r.baseCur:null!=r.baseCur&&r.overlay.combineTokens||i&&null==r.overlay.combineTokens?r.baseCur+" "+r.overlayCur:r.overlayCur},indent:e.indent&&function(t,n){return e.indent(t.base,n)},electricChars:e.electricChars,innerMode:function(t){return{state:t.base,mode:e}},blankLine:function(t){e.blankLine&&e.blankLine(t.base),n.blankLine&&n.blankLine(t.overlay)}}}},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],9:[function(t,e,n){var r;r=function(t){"use strict";function e(t){t.operation((function(){a(t)}))}function n(t){t.state.markedSelection.length&&t.operation((function(){r(t)}))}function i(t,e,n,i){if(0!=u(e,n))for(var r=t.state.markedSelection,o=t.state.markedSelectionStyle,a=e.line;;){var c=a==e.line?e:l(a,0),h=a+s,d=h>=n.line,f=d?n:l(h,0),p=t.markText(c,f,{className:o});if(null==i?r.push(p):r.splice(i++,0,p),d)break;a=h}}function r(t){for(var e=t.state.markedSelection,n=0;n<e.length;++n)e[n].clear();e.length=0}function o(t){r(t);for(var e=t.listSelections(),n=0;n<e.length;n++)i(t,e[n].from(),e[n].to())}function a(t){if(!t.somethingSelected())return r(t);if(t.listSelections().length>1)return o(t);var e=t.getCursor("start"),n=t.getCursor("end"),a=t.state.markedSelection;if(!a.length)return i(t,e,n);var l=a[0].find(),c=a[a.length-1].find();if(!l||!c||n.line-e.line<s||u(e,c.to)>=0||u(n,l.from)<=0)return o(t);for(;u(e,l.from)>0;)a.shift().clear(),l=a[0].find();for(u(e,l.from)<0&&(l.to.line-e.line<s?(a.shift().clear(),i(t,e,l.to,0)):i(t,e,l.from,0));u(n,c.to)<0;)a.pop().clear(),c=a[a.length-1].find();u(n,c.to)>0&&(n.line-c.from.line<s?(a.pop().clear(),i(t,c.from,n)):i(t,c.to,n))}t.defineOption("styleSelectedText",!1,(function(i,a,s){var l=s&&s!=t.Init;a&&!l?(i.state.markedSelection=[],i.state.markedSelectionStyle="string"==typeof a?a:"CodeMirror-selectedtext",o(i),i.on("cursorActivity",e),i.on("change",n)):!a&&l&&(i.off("cursorActivity",e),i.off("change",n),r(i),i.state.markedSelection=i.state.markedSelectionStyle=null)}));var s=8,l=t.Pos,u=t.cmpPos},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],10:[function(t,e,n){!function(t){if("object"==typeof n&&"object"==typeof e)e.exports=t();else{if("function"==typeof i&&i.amd)return i([],t);(this||window).CodeMirror=t()}}((function(){"use strict";function t(n,i){if(!(this instanceof t))return new t(n,i);this.options=i=i?Rr(i):{},Rr(ta,i,!1),f(i);var r=i.value;"string"==typeof r&&(r=new Sa(r,i.mode,null,i.lineSeparator)),this.doc=r;var o=new t.inputStyles[i.inputStyle](this),a=this.display=new e(n,r,o);a.wrapper.CodeMirror=this,u(this),s(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),i.autofocus&&!Ao&&a.input.focus(),v(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Lr,keySeq:null,specialChars:null};var l=this;for(var c in bo&&11>_o&&setTimeout((function(){l.display.input.reset(!0)}),20),He(this),Gr(),_e(this),this.curOp.forceUpdate=!0,Ki(this,r),i.autofocus&&!Ao||l.hasFocus()?setTimeout(Fr(vn,this),20):yn(this),ea)ea.hasOwnProperty(c)&&ea[c](this,i[c],na);x(this),i.finishInit&&i.finishInit(this);for(var h=0;h<aa.length;++h)aa[h](this);xe(this),wo&&i.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}function e(t,e,n){var i=this;this.input=n,i.scrollbarFiller=Hr("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=Hr("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=Hr("div",null,"CodeMirror-code"),i.selectionDiv=Hr("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=Hr("div",null,"CodeMirror-cursors"),i.measure=Hr("div",null,"CodeMirror-measure"),i.lineMeasure=Hr("div",null,"CodeMirror-measure"),i.lineSpace=Hr("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=Hr("div",[Hr("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=Hr("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=Hr("div",null,null,"position: absolute; height: "+ja+"px; width: 1px;"),i.gutters=Hr("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=Hr("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=Hr("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),bo&&8>_o&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),wo||go&&Ao||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function n(e){e.doc.mode=t.getMode(e.options,e.doc.modeOption),i(e)}function i(t){t.doc.iter((function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)})),t.doc.frontier=t.doc.first,Bt(t,100),t.state.modeGen++,t.curOp&&je(t)}function r(t){t.options.lineWrapping?(Ja(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Xa(t.display.wrapper,"CodeMirror-wrap"),d(t)),a(t),je(t),se(t),setTimeout((function(){y(t)}),100)}function o(t){var e=ye(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/be(t.display)-3);return function(r){if(xi(t.doc,r))return 0;var o=0;if(r.widgets)for(var a=0;a<r.widgets.length;a++)r.widgets[a].height&&(o+=r.widgets[a].height);return n?o+(Math.ceil(r.text.length/i)||1)*e:o+e}}function a(t){var e=t.doc,n=o(t);e.iter((function(t){var e=n(t);e!=t.height&&tr(t,e)}))}function s(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),se(t)}function l(t){u(t),je(t),setTimeout((function(){w(t)}),20)}function u(t){var e=t.display.gutters,n=t.options.gutters;Wr(e);for(var i=0;i<n.length;++i){var r=n[i],o=e.appendChild(Hr("div",null,"CodeMirror-gutter "+r));"CodeMirror-linenumbers"==r&&(t.display.lineGutter=o,o.style.width=(t.display.lineNumWidth||1)+"px")}e.style.display=i?"":"none",c(t)}function c(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function h(t){if(0==t.height)return 0;for(var e,n=t.text.length,i=t;e=mi(i);)i=(r=e.find(0,!0)).from.line,n+=r.from.ch-r.to.ch;for(i=t;e=gi(i);){var r=e.find(0,!0);n-=i.text.length-r.from.ch,n+=(i=r.to.line).text.length-r.to.ch}return n}function d(t){var e=t.display,n=t.doc;e.maxLine=Xi(n,n.first),e.maxLineLength=h(e.maxLine),e.maxLineChanged=!0,n.iter((function(t){var n=h(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}function f(t){var e=Nr(t.gutters,"CodeMirror-linenumbers");-1==e&&t.lineNumbers?t.gutters=t.gutters.concat(["CodeMirror-linenumbers"]):e>-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function p(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ut(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Zt(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function m(t,e,n){this.cm=n;var i=this.vert=Hr("div",[Hr("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=Hr("div",[Hr("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(i),t(r),La(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),La(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,bo&&8>_o&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function g(){}function v(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Xa(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new t.scrollbarModel[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),La(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?on(e,t):rn(e,t)}),e),e.display.scrollbars.addClass&&Ja(e.display.wrapper,e.display.scrollbars.addClass)}function y(t,e){e||(e=p(t));var n=t.display.barWidth,i=t.display.barHeight;b(t,e);for(var r=0;4>r&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&M(t),b(t,p(t)),n=t.display.barWidth,i=t.display.barHeight}function b(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}function _(t,e,n){var i=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;i=Math.floor(i-Wt(t));var r=n&&null!=n.bottom?n.bottom:i+t.wrapper.clientHeight,o=nr(e,i),a=nr(e,r);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=nr(e,ir(Xi(e,s))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=a&&(o=nr(e,ir(Xi(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function w(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=S(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){t.options.fixedGutter&&n[a].gutter&&(n[a].gutter.style.left=o);var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=i+r+"px")}}function x(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=k(t.options,e.first+e.size-1),i=t.display;if(n.length!=i.lineNumChars){var r=i.measure.appendChild(Hr("div",[Hr("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,a=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",c(t),!0}return!1}function k(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function S(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function C(t,e,n){var i=t.display;this.viewport=e,this.visible=_(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Yt(t),this.force=n,this.dims=N(t),this.events=[]}function T(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Zt(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Zt(t)+"px",e.scrollbarsClipped=!0)}function O(t,e){var n=t.display,i=t.doc;if(e.editorIsHidden)return Re(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==qe(t))return!1;x(t)&&(Re(t),e.dims=N(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),a=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),Ro&&(o=_i(t.doc,o),a=wi(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;ze(t,o,a),n.viewOffset=ir(Xi(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=qe(t);if(!s&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Vr();return l>4&&(n.lineDiv.style.display="none"),D(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Vr()!=u&&u.offsetHeight&&u.focus(),Wr(n.cursorDiv),Wr(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,Bt(t,400)),n.updateLineNumbers=null,!0}function E(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Yt(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ut(t.display)-$t(t),n.top)}),e.visible=_(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&O(t,e);i=!1){M(t);var r=p(t);Dt(t),y(t,r),L(t,r)}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function A(t,e){var n=new C(t,e);if(O(t,n)){M(t),E(t,n);var i=p(t);Dt(t),y(t,i),L(t,i),n.finish()}}function L(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Zt(t)+"px"}function M(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i<e.view.length;i++){var r,o=e.view[i];if(!o.hidden){if(bo&&8>_o){var a=o.node.offsetTop+o.node.offsetHeight;r=a-n,n=a}else{var s=o.node.getBoundingClientRect();r=s.bottom-s.top}var l=o.line.height-r;if(2>r&&(r=ye(e)),(l>.001||-.001>l)&&(tr(o.line,r),P(o.line),o.rest))for(var u=0;u<o.rest.length;u++)P(o.rest[u])}}}function P(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e)t.widgets[e].height=t.widgets[e].node.parentNode.offsetHeight}function N(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[t.options.gutters[a]]=o.offsetLeft+o.clientLeft+r,i[t.options.gutters[a]]=o.clientWidth;return{fixedPos:S(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function D(t,e,n){function i(e){var n=e.nextSibling;return wo&&Lo&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var r=t.display,o=t.options.lineNumbers,a=r.lineDiv,s=a.firstChild,l=r.view,u=r.viewFrom,c=0;c<l.length;c++){var h=l[c];if(h.hidden);else if(h.node&&h.node.parentNode==a){for(;s!=h.node;)s=i(s);var d=o&&null!=e&&u>=e&&h.lineNumber;h.changes&&(Nr(h.changes,"gutter")>-1&&(d=!1),j(t,h,u,n)),d&&(Wr(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(k(t.options,u)))),s=h.node.nextSibling}else{var f=W(t,h,u,n);a.insertBefore(f,s)}u+=h.size}for(;s;)s=i(s)}function j(t,e,n,i){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?B(t,e):"gutter"==o?q(t,e,n,i):"class"==o?z(e):"widget"==o&&H(t,e,i)}e.changes=null}function I(t){return t.node==t.text&&(t.node=Hr("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),bo&&8>_o&&(t.node.style.zIndex=2)),t.node}function R(t){var e=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(e&&(e+=" CodeMirror-linebackground"),t.background)e?t.background.className=e:(t.background.parentNode.removeChild(t.background),t.background=null);else if(e){var n=I(t);t.background=n.insertBefore(Hr("div",null,e),n.firstChild)}}function F(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):Fi(t,e)}function B(t,e){var n=e.text.className,i=F(t,e);e.text==e.node&&(e.node=i.pre),e.text.parentNode.replaceChild(i.pre,e.text),e.text=i.pre,i.bgClass!=e.bgClass||i.textClass!=e.textClass?(e.bgClass=i.bgClass,e.textClass=i.textClass,z(e)):n&&(e.text.className=n)}function z(t){R(t),t.line.wrapClass?I(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var e=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=e||""}function q(t,e,n,i){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var r=I(e);e.gutterBackground=Hr("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),r.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){r=I(e);var a=e.gutter=Hr("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(t.display.input.setUneditable(a),r.insertBefore(a,e.text),e.line.gutterClass&&(a.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=a.appendChild(Hr("div",k(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<t.options.gutters.length;++s){var l=t.options.gutters[s],u=o.hasOwnProperty(l)&&o[l];u&&a.appendChild(Hr("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[l]+"px; width: "+i.gutterWidth[l]+"px"))}}}function H(t,e,n){e.alignable&&(e.alignable=null);for(var i=e.node.firstChild;i;i=r){var r=i.nextSibling;"CodeMirror-linewidget"==i.className&&e.node.removeChild(i)}U(t,e,n)}function W(t,e,n,i){var r=F(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),z(e),q(t,e,n,i),U(t,e,i),e.node}function U(t,e,n){if(V(t,e.line,e,n,!0),e.rest)for(var i=0;i<e.rest.length;i++)V(t,e.rest[i],e,n,!1)}function V(t,e,n,i,r){if(e.widgets)for(var o=I(n),a=0,s=e.widgets;a<s.length;++a){var l=s[a],u=Hr("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Z(l,u,n,i),t.display.input.setUneditable(u),r&&l.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),Sr(l,"redraw")}}function Z(t,e,n,i){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var r=i.wrapperWidth;e.style.left=i.fixedPos+"px",t.coverGutter||(r-=i.gutterTotalWidth,e.style.paddingLeft=i.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-i.gutterTotalWidth+"px"))}function Y(t){return Fo(t.line,t.ch)}function $(t,e){return Bo(t,e)<0?e:t}function G(t,e){return Bo(t,e)<0?t:e}function K(t){t.state.focused||(t.display.input.focus(),vn(t))}function X(t,e,n,i,r){var o=t.doc;t.display.shift=!1,i||(i=o.sel);var a=t.state.pasteIncoming||"paste"==r,s=o.splitLines(e),l=null;if(a&&i.ranges.length>1)if(zo&&zo.text.join("\n")==e){if(i.ranges.length%zo.text.length==0){l=[];for(var u=0;u<zo.text.length;u++)l.push(o.splitLines(zo.text[u]))}}else s.length==i.ranges.length&&(l=Dr(s,(function(t){return[t]})));for(u=i.ranges.length-1;u>=0;u--){var c=i.ranges[u],h=c.from(),d=c.to();c.empty()&&(n&&n>0?h=Fo(h.line,h.ch-n):t.state.overwrite&&!a?d=Fo(d.line,Math.min(Xi(o,d.line).text.length,d.ch+Pr(s).length)):zo&&zo.lineWise&&zo.text.join("\n")==e&&(h=d=Fo(h.line,0)));var f=t.curOp.updateInput,p={from:h,to:d,text:l?l[u%l.length]:s,origin:r||(a?"paste":t.state.cutIncoming?"cut":"+input")};Tn(t.doc,p),Sr(t,"inputRead",t,p)}e&&!a&&Q(t,e),Fn(t),t.curOp.updateInput=f,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function J(t,e){var n=t.clipboardData&&t.clipboardData.getData("text/plain");return n?(t.preventDefault(),e.isReadOnly()||e.options.disableInput||Ae(e,(function(){X(e,n,0,null,"paste")})),!0):void 0}function Q(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(e.indexOf(o.electricChars.charAt(s))>-1){a=zn(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xi(t.doc,r.head.line).text.slice(0,r.head.ch))&&(a=zn(t,r.head.line,"smart"));a&&Sr(t,"electricInput",t,r.head.line)}}}function tt(t){for(var e=[],n=[],i=0;i<t.doc.sel.ranges.length;i++){var r=t.doc.sel.ranges[i].head.line,o={anchor:Fo(r,0),head:Fo(r+1,0)};n.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:n}}function et(t){t.setAttribute("autocorrect","off"),t.setAttribute("autocapitalize","off"),t.setAttribute("spellcheck","false")}function nt(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Lr,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function it(){var t=Hr("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),e=Hr("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return wo?t.style.width="1000px":t.setAttribute("wrap","off"),Eo&&(t.style.border="1px solid black"),et(t),e}function rt(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Lr,this.gracePeriod=!1}function ot(t,e){var n=Qt(t,e.line);if(!n||n.hidden)return null;var i=Xi(t.doc,e.line),r=Kt(n,i,e.line),o=rr(i),a="left";o&&(a=uo(o,e.ch)%2?"right":"left");var s=ne(r.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function at(t,e){return e&&(t.bad=!0),t}function st(t,e,n){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[n]))return at(t.clipPos(Fo(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var o=t.display.view[r];if(o.node==i)return lt(o,e,n)}}function lt(t,e,n){function i(e,n,i){for(var r=-1;r<(c?c.length:0);r++)for(var o=0>r?u.map:c[r],a=0;a<o.length;a+=3){var s=o[a+2];if(s==e||s==n){var l=er(0>r?t.line:t.rest[r]),h=o[a]+i;return(0>i||s!=e)&&(h=o[a+(i?1:0)]),Fo(l,h)}}}var r=t.text.firstChild,o=!1;if(!e||!$a(r,e))return at(Fo(er(t.line),0),!0);if(e==r&&(o=!0,e=r.childNodes[n],n=0,!e)){var a=t.rest?Pr(t.rest):t.line;return at(Fo(er(a),a.text.length),o)}var s=3==e.nodeType?e:null,l=e;for(s||1!=e.childNodes.length||3!=e.firstChild.nodeType||(s=e.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var u=t.measure,c=u.maps,h=i(s,l,n);if(h)return at(h,o);for(var d=l.nextSibling,f=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(h=i(d,d.firstChild,0))return at(Fo(h.line,h.ch-f),o);f+=d.textContent.length}var p=l.previousSibling;for(f=n;p;p=p.previousSibling){if(h=i(p,p.firstChild,-1))return at(Fo(h.line,h.ch+f),o);f+=d.textContent.length}}function ut(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function a(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return""==n&&(n=e.textContent.replace(/\u200b/g,"")),void(s+=n);var c,h=e.getAttribute("cm-marker");if(h){var d=t.findMarks(Fo(i,0),Fo(r+1,0),o(+h));return void(d.length&&(c=d[0].find())&&(s+=Ji(t.doc,c.from,c.to).join(u)))}if("false"==e.getAttribute("contenteditable"))return;for(var f=0;f<e.childNodes.length;f++)a(e.childNodes[f]);/^(pre|div|p)$/i.test(e.nodeName)&&(l=!0)}else if(3==e.nodeType){var p=e.nodeValue;if(!p)return;l&&(s+=u,l=!1),s+=p}}for(var s="",l=!1,u=t.doc.lineSeparator();a(e),e!=n;)e=e.nextSibling;return s}function ct(t,e){this.ranges=t,this.primIndex=e}function ht(t,e){this.anchor=t,this.head=e}function dt(t,e){var n=t[e];t.sort((function(t,e){return Bo(t.from(),e.from())})),e=Nr(t,n);for(var i=1;i<t.length;i++){var r=t[i],o=t[i-1];if(Bo(o.to(),r.from())>=0){var a=G(o.from(),r.from()),s=$(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;e>=i&&--e,t.splice(--i,2,new ht(l?s:a,l?a:s))}}return new ct(t,e)}function ft(t,e){return new ct([new ht(t,e||t)],0)}function pt(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function mt(t,e){if(e.line<t.first)return Fo(t.first,0);var n=t.first+t.size-1;return e.line>n?Fo(n,Xi(t,n).text.length):gt(e,Xi(t,e.line).text.length)}function gt(t,e){var n=t.ch;return null==n||n>e?Fo(t.line,e):0>n?Fo(t.line,0):t}function vt(t,e){return e>=t.first&&e<t.first+t.size}function yt(t,e){for(var n=[],i=0;i<e.length;i++)n[i]=mt(t,e[i]);return n}function bt(t,e,n,i){if(t.cm&&t.cm.display.shift||t.extend){var r=e.anchor;if(i){var o=Bo(n,r)<0;o!=Bo(i,r)<0?(r=n,n=i):o!=Bo(n,i)<0&&(n=i)}return new ht(r,n)}return new ht(i||n,n)}function _t(t,e,n,i){Tt(t,new ct([bt(t,t.sel.primary(),e,n)],0),i)}function wt(t,e,n){for(var i=[],r=0;r<t.sel.ranges.length;r++)i[r]=bt(t,t.sel.ranges[r],e[r],null);Tt(t,dt(i,t.sel.primIndex),n)}function xt(t,e,n,i){var r=t.sel.ranges.slice(0);r[e]=n,Tt(t,dt(r,t.sel.primIndex),i)}function kt(t,e,n,i){Tt(t,ft(e,n),i)}function St(t,e,n){var i={ranges:e.ranges,update:function(e){this.ranges=[];for(var n=0;n<e.length;n++)this.ranges[n]=new ht(mt(t,e[n].anchor),mt(t,e[n].head))},origin:n&&n.origin};return Na(t,"beforeSelectionChange",t,i),t.cm&&Na(t.cm,"beforeSelectionChange",t.cm,i),i.ranges!=e.ranges?dt(i.ranges,i.ranges.length-1):e}function Ct(t,e,n){var i=t.history.done,r=Pr(i);r&&r.ranges?(i[i.length-1]=e,Ot(t,e,n)):Tt(t,e,n)}function Tt(t,e,n){Ot(t,e,n),hr(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function Ot(t,e,n){(Er(t,"beforeSelectionChange")||t.cm&&Er(t.cm,"beforeSelectionChange"))&&(e=St(t,e,n));var i=n&&n.bias||(Bo(e.primary().head,t.sel.primary().head)<0?-1:1);Et(t,Lt(t,e,i,!0)),n&&!1===n.scroll||!t.cm||Fn(t.cm)}function Et(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=t.cm.curOp.selectionChanged=!0,Or(t.cm)),Sr(t,"cursorActivity",t))}function At(t){Et(t,Lt(t,t.sel,null,!1),Ra)}function Lt(t,e,n,i){for(var r,o=0;o<e.ranges.length;o++){var a=e.ranges[o],s=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=Pt(t,a.anchor,s&&s.anchor,n,i),u=Pt(t,a.head,s&&s.head,n,i);(r||l!=a.anchor||u!=a.head)&&(r||(r=e.ranges.slice(0,o)),r[o]=new ht(l,u))}return r?dt(r,e.primIndex):e}function Mt(t,e,n,i,r){var o=Xi(t,e.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker;if((null==s.from||(l.inclusiveLeft?s.from<=e.ch:s.from<e.ch))&&(null==s.to||(l.inclusiveRight?s.to>=e.ch:s.to>e.ch))){if(r&&(Na(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u,c=l.find(0>i?1:-1);if((0>i?l.inclusiveRight:l.inclusiveLeft)&&(c=Nt(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=Bo(c,n))&&(0>i?0>u:u>0))return Mt(t,c,e,i,r)}var h=l.find(0>i?-1:1);return(0>i?l.inclusiveLeft:l.inclusiveRight)&&(h=Nt(t,h,i,h.line==e.line?o:null)),h?Mt(t,h,e,i,r):null}}return e}function Pt(t,e,n,i,r){var o=i||1,a=Mt(t,e,n,o,r)||!r&&Mt(t,e,n,o,!0)||Mt(t,e,n,-o,r)||!r&&Mt(t,e,n,-o,!0);return a||(t.cantEdit=!0,Fo(t.first,0))}function Nt(t,e,n,i){return 0>n&&0==e.ch?e.line>t.first?mt(t,Fo(e.line-1)):null:n>0&&e.ch==(i||Xi(t,e.line)).text.length?e.line<t.first+t.size-1?Fo(e.line+1,0):null:new Fo(e.line,e.ch+n)}function Dt(t){t.display.input.showSelection(t.display.input.prepareSelection())}function jt(t,e){for(var n=t.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(!1!==e||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=t.display.viewTo||s.to().line<t.display.viewFrom)){var l=s.empty();(l||t.options.showCursorWhenSelecting)&&It(t,s.head,r),l||Rt(t,s,o)}}return i}function It(t,e,n){var i=fe(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),r=n.appendChild(Hr("div"," ","CodeMirror-cursor"));if(r.style.left=i.left+"px",r.style.top=i.top+"px",r.style.height=Math.max(0,i.bottom-i.top)*t.options.cursorHeight+"px",i.other){var o=n.appendChild(Hr("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=i.other.left+"px",o.style.top=i.other.top+"px",o.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Rt(t,e,n){function i(t,e,n,i){0>e&&(e=0),e=Math.round(e),i=Math.round(i),s.appendChild(Hr("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px; top: "+e+"px; width: "+(null==n?c-t:n)+"px; height: "+(i-e)+"px"))}function r(e,n,r){function o(n,i){return de(t,Fo(e,n),"div",h,i)}var s,l,h=Xi(a,e),d=h.text.length;return to(rr(h),n||0,null==r?d:r,(function(t,e,a){var h,f,p,m=o(t,"left");if(t==e)h=m,f=p=m.left;else{if(h=o(e-1,"right"),"rtl"==a){var g=m;m=h,h=g}f=m.left,p=h.right}null==n&&0==t&&(f=u),h.top-m.top>3&&(i(f,m.top,null,m.bottom),f=u,m.bottom<h.top&&i(f,m.bottom,null,h.top)),null==r&&e==d&&(p=c),(!s||m.top<s.top||m.top==s.top&&m.left<s.left)&&(s=m),(!l||h.bottom>l.bottom||h.bottom==l.bottom&&h.right>l.right)&&(l=h),u+1>f&&(f=u),i(f,h.top,p-f,h.bottom)})),{start:s,end:l}}var o=t.display,a=t.doc,s=document.createDocumentFragment(),l=Vt(t.display),u=l.left,c=Math.max(o.sizerWidth,Yt(t)-o.sizer.offsetLeft)-l.right,h=e.from(),d=e.to();if(h.line==d.line)r(h.line,h.ch,d.ch);else{var f=Xi(a,h.line),p=Xi(a,d.line),m=yi(f)==yi(p),g=r(h.line,h.ch,m?f.text.length+1:null).end,v=r(d.line,m?0:null,d.ch).start;m&&(g.top<v.top-2?(i(g.right,g.top,null,g.bottom),i(u,v.top,v.left,v.bottom)):i(g.right,g.top,v.left-g.right,g.bottom)),g.bottom<v.top&&i(u,g.bottom,null,v.top)}n.appendChild(s)}function Ft(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval((function(){e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Bt(t,e){t.doc.mode.startState&&t.doc.frontier<t.display.viewTo&&t.state.highlight.set(e,Fr(zt,t))}function zt(t){var e=t.doc;if(e.frontier<e.first&&(e.frontier=e.first),!(e.frontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,i=la(e.mode,Ht(t,e.frontier)),r=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(e.frontier>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength,l=Di(t,o,s?la(e.mode,i):i,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!h&&d<a.length;++d)h=a[d]!=o.styles[d];h&&r.push(e.frontier),o.stateAfter=s?i:la(e.mode,i)}else o.text.length<=t.options.maxHighlightLength&&Ii(t,o.text,i),o.stateAfter=e.frontier%5==0?la(e.mode,i):null;return++e.frontier,+new Date>n?(Bt(t,t.options.workDelay),!0):void 0})),r.length&&Ae(t,(function(){for(var e=0;e<r.length;e++)Ie(t,r[e],"text")}))}}function qt(t,e,n){for(var i,r,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Xi(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=za(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=s-1,i=u)}return r}function Ht(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return!0;var o=qt(t,e,n),a=o>i.first&&Xi(i,o-1).stateAfter;return a=a?la(i.mode,a):ua(i.mode),i.iter(o,e,(function(n){Ii(t,n.text,a);var s=o==e-1||o%5==0||o>=r.viewFrom&&o<r.viewTo;n.stateAfter=s?la(i.mode,a):null,++o})),n&&(i.frontier=o),a}function Wt(t){return t.lineSpace.offsetTop}function Ut(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Vt(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=Ur(t.measure,Hr("pre","x")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(t.cachedPaddingH=i),i}function Zt(t){return ja-t.display.nativeBarWidth}function Yt(t){return t.display.scroller.clientWidth-Zt(t)-t.display.barWidth}function $t(t){return t.display.scroller.clientHeight-Zt(t)-t.display.barHeight}function Gt(t,e,n){var i=t.options.lineWrapping,r=i&&Yt(t);if(!e.measure.heights||i&&e.measure.width!=r){var o=e.measure.heights=[];if(i){e.measure.width=r;for(var a=e.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Kt(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;i<t.rest.length;i++)if(t.rest[i]==e)return{map:t.measure.maps[i],cache:t.measure.caches[i]};for(i=0;i<t.rest.length;i++)if(er(t.rest[i])>n)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Xt(t,e){var n=er(e=yi(e)),i=t.display.externalMeasured=new Ne(t.doc,e,n);i.lineN=n;var r=i.built=Fi(t,i);return i.text=r.pre,Ur(t.display.lineMeasure,r.pre),i}function Jt(t,e,n,i){return ee(t,te(t,e),n,i)}function Qt(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[Fe(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function te(t,e){var n=er(e),i=Qt(t,n);i&&!i.text?i=null:i&&i.changes&&(j(t,i,n,N(t)),t.curOp.forceUpdate=!0),i||(i=Xt(t,e));var r=Kt(i,e,n);return{line:e,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function ee(t,e,n,i,r){e.before&&(n=-1);var o,a=n+(i||"");return e.cache.hasOwnProperty(a)?o=e.cache[a]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(Gt(t,e.view,e.rect),e.hasHeights=!0),(o=ie(t,e,n,i)).bogus||(e.cache[a]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}function ne(t,e,n){for(var i,r,o,a,s=0;s<t.length;s+=3){var l=t[s],u=t[s+1];if(l>e?(r=0,o=1,a="left"):u>e?o=1+(r=e-l):(s==t.length-3||e==u&&t[s+3]>e)&&(r=(o=u-l)-1,e>=u&&(a="right")),null!=r){if(i=t[s+2],l==u&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;s&&t[s-2]==t[s-3]&&t[s-1].insertLeft;)i=t[2+(s-=3)],a="left";if("right"==n&&r==u-l)for(;s<t.length-3&&t[s+3]==t[s+4]&&!t[s+5].insertLeft;)i=t[(s+=3)+2],a="right";break}}return{node:i,start:r,end:o,collapse:a,coverStart:l,coverEnd:u}}function ie(t,e,n,i){var r,o=ne(e.map,n,i),a=o.node,s=o.start,l=o.end,u=o.collapse;if(3==a.nodeType){for(var c=0;4>c;c++){for(;s&&qr(e.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l<o.coverEnd&&qr(e.line.text.charAt(o.coverStart+l));)++l;if((r=bo&&9>_o&&0==s&&l==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():bo&&t.options.lineWrapping?(h=Ua(a,s,l).getClientRects()).length?h["right"==i?h.length-1:0]:Uo:Ua(a,s,l).getBoundingClientRect()||Uo).left||r.right||0==s)break;l=s,s-=1,u="right"}bo&&11>_o&&(r=re(t.display.measure,r))}else{var h;s>0&&(u=i="right"),r=t.options.lineWrapping&&(h=a.getClientRects()).length>1?h["right"==i?h.length-1:0]:a.getBoundingClientRect()}if(bo&&9>_o&&!s&&(!r||!r.left&&!r.right)){var d=a.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+be(t.display),top:d.top,bottom:d.bottom}:Uo}var f=r.top-e.rect.top,p=r.bottom-e.rect.top,m=(f+p)/2,g=e.view.measure.heights;for(c=0;c<g.length-1&&!(m<g[c]);c++);var v=c?g[c-1]:0,y=g[c],b={left:("right"==u?r.right:r.left)-e.rect.left,right:("left"==u?r.left:r.right)-e.rect.left,top:v,bottom:y};return r.left||r.right||(b.bogus=!0),t.options.singleCursorHeightPerLine||(b.rtop=f,b.rbottom=p),b}function re(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Qr(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*i}}function oe(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function ae(t){t.display.externalMeasure=null,Wr(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)oe(t.display.view[e])}function se(t){ae(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function le(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ue(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function ce(t,e,n,i){if(e.widgets)for(var r=0;r<e.widgets.length;++r)if(e.widgets[r].above){var o=Ci(e.widgets[r]);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var a=ir(e);if("local"==i?a+=Wt(t.display):a-=t.display.viewOffset,"page"==i||"window"==i){var s=t.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==i?0:ue());var l=s.left+("window"==i?0:le());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function he(t,e,n){if("div"==n)return e;var i=e.left,r=e.top;if("page"==n)i-=le(),r-=ue();else if("local"==n||!n){var o=t.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var a=t.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:r-a.top}}function de(t,e,n,i,r){return i||(i=Xi(t.doc,e.line)),ce(t,i,Jt(t,i,e.ch,r),n)}function fe(t,e,n,i,r,o){function a(e,a){var s=ee(t,r,e,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,ce(t,i,s,n)}function s(t,e){var n=l[e],i=n.level%2;return t==eo(n)&&e&&n.level<l[e-1].level?(t=no(n=l[--e])-(n.level%2?0:1),i=!0):t==no(n)&&e<l.length-1&&n.level<l[e+1].level&&(t=eo(n=l[++e])-n.level%2,i=!1),i&&t==n.to&&t>n.from?a(t-1):a(t,i)}i=i||Xi(t.doc,e.line),r||(r=te(t,i));var l=rr(i),u=e.ch;if(!l)return a(u);var c=s(u,uo(l,u));return null!=as&&(c.other=s(u,as)),c}function pe(t,e){var n=0;e=mt(t.doc,e),t.options.lineWrapping||(n=be(t.display)*e.ch);var i=Xi(t.doc,e.line),r=ir(i)+Wt(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function me(t,e,n,i){var r=Fo(t,e);return r.xRel=i,n&&(r.outside=!0),r}function ge(t,e,n){var i=t.doc;if(0>(n+=t.display.viewOffset))return me(i.first,0,!0,-1);var r=nr(i,n),o=i.first+i.size-1;if(r>o)return me(i.first+i.size-1,Xi(i,o).text.length,!0,1);0>e&&(e=0);for(var a=Xi(i,r);;){var s=ve(t,a,r,e,n),l=gi(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;r=er(a=u.to.line)}}function ve(t,e,n,i,r){function o(i){var r=fe(t,Fo(n,i),"line",e,u);return s=!0,a>r.bottom?r.left-l:a<r.top?r.left+l:(s=!1,r.left)}var a=r-ir(e),s=!1,l=2*t.display.wrapper.clientWidth,u=te(t,e),c=rr(e),h=e.text.length,d=io(e),f=ro(e),p=o(d),m=s,g=o(f),v=s;if(i>g)return me(n,f,v,1);for(;;){if(c?f==d||f==ho(e,d,1):1>=f-d){for(var y=p>i||g-i>=i-p?d:f,b=i-(y==d?p:g);qr(e.text.charAt(y));)++y;return me(n,y,y==d?m:v,-1>b?-1:b>1?1:0)}var _=Math.ceil(h/2),w=d+_;if(c){w=d;for(var x=0;_>x;++x)w=ho(e,w,1)}var k=o(w);k>i?(f=w,g=k,(v=s)&&(g+=1e3),h=_):(d=w,p=k,m=s,h-=_)}}function ye(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==qo){qo=Hr("pre");for(var e=0;49>e;++e)qo.appendChild(document.createTextNode("x")),qo.appendChild(Hr("br"));qo.appendChild(document.createTextNode("x"))}Ur(t.measure,qo);var n=qo.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),Wr(t.measure),n||1}function be(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=Hr("span","xxxxxxxxxx"),n=Hr("pre",[e]);Ur(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function _e(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zo},Vo?Vo.ops.push(t.curOp):t.curOp.ownsGroup=Vo={ops:[t.curOp],delayedCallbacks:[]}}function we(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);for(var i=0;i<t.ops.length;i++){var r=t.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<e.length)}function xe(t){var e=t.curOp.ownsGroup;if(e)try{we(e)}finally{Vo=null;for(var n=0;n<e.ops.length;n++)e.ops[n].cm.curOp=null;ke(e)}}function ke(t){for(var e=t.ops,n=0;n<e.length;n++)Se(e[n]);for(n=0;n<e.length;n++)Ce(e[n]);for(n=0;n<e.length;n++)Te(e[n]);for(n=0;n<e.length;n++)Oe(e[n]);for(n=0;n<e.length;n++)Ee(e[n])}function Se(t){var e=t.cm,n=e.display;T(e),t.updateMaxLine&&d(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new C(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Ce(t){t.updatedDisplay=t.mustUpdate&&O(t.cm,t.update)}function Te(t){var e=t.cm,n=e.display;t.updatedDisplay&&M(e),t.barMeasure=p(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Jt(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Zt(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Yt(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function Oe(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&on(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==Vr()&&(!document.hasFocus||document.hasFocus());t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&y(e,t.barMeasure),t.updatedDisplay&&L(e,t.barMeasure),t.selectionChanged&&Ft(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&K(t.cm)}function Ee(t){var e=t.cm,n=e.display,i=e.doc;if(t.updatedDisplay&&E(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==t.scrollTop||n.scroller.scrollTop==t.scrollTop&&!t.forceScroll||(i.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,t.scrollTop)),n.scrollbars.setScrollTop(i.scrollTop),n.scroller.scrollTop=i.scrollTop),null==t.scrollLeft||n.scroller.scrollLeft==t.scrollLeft&&!t.forceScroll||(i.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-n.scroller.clientWidth,t.scrollLeft)),n.scrollbars.setScrollLeft(i.scrollLeft),n.scroller.scrollLeft=i.scrollLeft,w(e)),t.scrollToPos){var r=Dn(e,mt(i,t.scrollToPos.from),mt(i,t.scrollToPos.to),t.scrollToPos.margin);t.scrollToPos.isCursor&&e.state.focused&&Nn(e,r)}var o=t.maybeHiddenMarkers,a=t.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||Na(o[s],"hide");if(a)for(s=0;s<a.length;++s)a[s].lines.length&&Na(a[s],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&Na(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function Ae(t,e){if(t.curOp)return e();_e(t);try{return e()}finally{xe(t)}}function Le(t,e){return function(){if(t.curOp)return e.apply(t,arguments);_e(t);try{return e.apply(t,arguments)}finally{xe(t)}}}function Me(t){return function(){if(this.curOp)return t.apply(this,arguments);_e(this);try{return t.apply(this,arguments)}finally{xe(this)}}}function Pe(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);_e(e);try{return t.apply(this,arguments)}finally{xe(e)}}}function Ne(t,e,n){this.line=e,this.rest=bi(e),this.size=this.rest?er(Pr(this.rest))-n+1:1,this.node=this.text=null,this.hidden=xi(t,e)}function De(t,e,n){for(var i,r=[],o=e;n>o;o=i){var a=new Ne(t.doc,Xi(t.doc,o),o);i=o+a.size,r.push(a)}return r}function je(t,e,n,i){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),i||(i=0);var r=t.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ro&&_i(t.doc,e)<r.viewTo&&Re(t);else if(n<=r.viewFrom)Ro&&wi(t.doc,n+i)>r.viewFrom?Re(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)Re(t);else if(e<=r.viewFrom)(o=Be(t,n,n+i,1))?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Re(t);else if(n>=r.viewTo){var o;(o=Be(t,e,e,-1))?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Re(t)}else{var a=Be(t,e,e,-1),s=Be(t,n,n+i,1);a&&s?(r.view=r.view.slice(0,a.index).concat(De(t,a.lineN,s.lineN)).concat(r.view.slice(s.index)),r.viewTo+=i):Re(t)}var l=r.externalMeasured;l&&(n<l.lineN?l.lineN+=i:e<l.lineN+l.size&&(r.externalMeasured=null))}function Ie(t,e,n){t.curOp.viewChanged=!0;var i=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(i.externalMeasured=null),!(e<i.viewFrom||e>=i.viewTo)){var o=i.view[Fe(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Nr(a,n)&&a.push(n)}}}function Re(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Fe(t,e){if(e>=t.display.viewTo)return null;if(0>(e-=t.display.viewFrom))return null;for(var n=t.display.view,i=0;i<n.length;i++)if(0>(e-=n[i].size))return i}function Be(t,e,n,i){var r,o=Fe(t,e),a=t.display.view;if(!Ro||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=0,l=t.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=e){if(i>0){if(o==a.length-1)return null;r=l+a[o].size-e,o++}else r=l-e;e+=r,n+=r}for(;_i(t.doc,n)!=n;){if(o==(0>i?0:a.length-1))return null;n+=i*a[o-(0>i?1:0)].size,o+=i}return{index:o,lineN:n}}function ze(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=De(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=De(t,e,i.viewFrom).concat(i.view):i.viewFrom<e&&(i.view=i.view.slice(Fe(t,e))),i.viewFrom=e,i.viewTo<n?i.view=i.view.concat(De(t,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,Fe(t,n)))),i.viewTo=n}function qe(t){for(var e=t.display.view,n=0,i=0;i<e.length;i++){var r=e[i];r.hidden||r.node&&!r.changes||++n}return n}function He(t){function e(){r.activeTouch&&(o=setTimeout((function(){r.activeTouch=null}),1e3),(a=r.activeTouch).end=+new Date)}function n(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function i(t,e){if(null==e.left)return!0;var n=e.left-t.left,i=e.top-t.top;return n*n+i*i>400}var r=t.display;La(r.scroller,"mousedown",Le(t,Ye)),La(r.scroller,"dblclick",bo&&11>_o?Le(t,(function(e){if(!Tr(t,e)){var n=Ze(t,e);if(n&&!Je(t,e)&&!Ve(t.display,e)){Oa(e);var i=t.findWordAt(n);_t(t.doc,i.anchor,i.head)}}})):function(e){Tr(t,e)||Oa(e)}),jo||La(r.scroller,"contextmenu",(function(e){bn(t,e)}));var o,a={end:0};La(r.scroller,"touchstart",(function(e){if(!Tr(t,e)&&!n(e)){clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-a.end<=300?a:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}})),La(r.scroller,"touchmove",(function(){r.activeTouch&&(r.activeTouch.moved=!0)})),La(r.scroller,"touchend",(function(n){var o=r.activeTouch;if(o&&!Ve(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=t.coordsChar(r.activeTouch,"page");a=!o.prev||i(o,o.prev)?new ht(s,s):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(s):new ht(Fo(s.line,0),mt(t.doc,Fo(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),Oa(n)}e()})),La(r.scroller,"touchcancel",e),La(r.scroller,"scroll",(function(){r.scroller.clientHeight&&(rn(t,r.scroller.scrollTop),on(t,r.scroller.scrollLeft,!0),Na(t,"scroll",t))})),La(r.scroller,"mousewheel",(function(e){an(t,e)})),La(r.scroller,"DOMMouseScroll",(function(e){an(t,e)})),La(r.wrapper,"scroll",(function(){r.wrapper.scrollTop=r.wrapper.scrollLeft=0})),r.dragFunctions={enter:function(e){Tr(t,e)||Aa(e)},over:function(e){Tr(t,e)||(en(t,e),Aa(e))},start:function(e){tn(t,e)},drop:Le(t,Qe),leave:function(e){Tr(t,e)||nn(t)}};var s=r.input.getField();La(s,"keyup",(function(e){pn.call(t,e)})),La(s,"keydown",Le(t,dn)),La(s,"keypress",Le(t,mn)),La(s,"focus",Fr(vn,t)),La(s,"blur",Fr(yn,t))}function We(e,n,i){if(!n!=!(i&&i!=t.Init)){var r=e.display.dragFunctions,o=n?La:Pa;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Ue(t){var e=t.display;e.lastWrapHeight==e.wrapper.clientHeight&&e.lastWrapWidth==e.wrapper.clientWidth||(e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize())}function Ve(t,e){for(var n=wr(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function Ze(t,e,n,i){var r=t.display;if(!n&&"true"==wr(e).getAttribute("cm-not-content"))return null;var o,a,s=r.lineSpace.getBoundingClientRect();try{o=e.clientX-s.left,a=e.clientY-s.top}catch(e){return null}var l,u=ge(t,o,a);if(i&&1==u.xRel&&(l=Xi(t.doc,u.line).text).length==u.ch){var c=za(l,l.length,t.options.tabSize)-l.length;u=Fo(u.line,Math.max(0,Math.round((o-Vt(t.display).left)/be(t.display))-c))}return u}function Ye(t){var e=this,n=e.display;if(!(Tr(e,t)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=t.shiftKey,Ve(n,t))return void(wo||(n.scroller.draggable=!1,setTimeout((function(){n.scroller.draggable=!0}),100)));if(!Je(e,t)){var i=Ze(e,t);switch(window.focus(),xr(t)){case 1:e.state.selectingText?e.state.selectingText(t):i?$e(e,t,i):wr(t)==n.scroller&&Oa(t);break;case 2:wo&&(e.state.lastMiddleDown=+new Date),i&&_t(e.doc,i),setTimeout((function(){n.input.focus()}),20),Oa(t);break;case 3:jo?bn(e,t):gn(e)}}}}function $e(t,e,n){bo?setTimeout(Fr(K,t),0):t.curOp.focus=Vr();var i,r=+new Date;Wo&&Wo.time>r-400&&0==Bo(Wo.pos,n)?i="triple":Ho&&Ho.time>r-400&&0==Bo(Ho.pos,n)?(i="double",Wo={time:r,pos:n}):(i="single",Ho={time:r,pos:n});var o,a=t.doc.sel,s=Lo?e.metaKey:e.ctrlKey;t.options.dragDrop&&ts&&!t.isReadOnly()&&"single"==i&&(o=a.contains(n))>-1&&(Bo((o=a.ranges[o]).from(),n)<0||n.xRel>0)&&(Bo(o.to(),n)>0||n.xRel<0)?Ge(t,e,n,s):Ke(t,e,n,i,s)}function Ge(t,e,n,i){var r=t.display,o=+new Date,a=Le(t,(function(s){wo&&(r.scroller.draggable=!1),t.state.draggingText=!1,Pa(document,"mouseup",a),Pa(r.scroller,"drop",a),Math.abs(e.clientX-s.clientX)+Math.abs(e.clientY-s.clientY)<10&&(Oa(s),!i&&+new Date-200<o&&_t(t.doc,n),wo||bo&&9==_o?setTimeout((function(){document.body.focus(),r.input.focus()}),20):r.input.focus())}));wo&&(r.scroller.draggable=!0),t.state.draggingText=a,r.scroller.dragDrop&&r.scroller.dragDrop(),La(document,"mouseup",a),La(r.scroller,"drop",a)}function Ke(t,e,n,i,r){function o(e){if(0!=Bo(g,e))if(g=e,"rect"==i){for(var r=[],o=t.options.tabSize,a=za(Xi(u,n.line).text,n.ch,o),s=za(Xi(u,e.line).text,e.ch,o),l=Math.min(a,s),f=Math.max(a,s),p=Math.min(n.line,e.line),m=Math.min(t.lastLine(),Math.max(n.line,e.line));m>=p;p++){var v=Xi(u,p).text,y=qa(v,l,o);l==f?r.push(new ht(Fo(p,y),Fo(p,y))):v.length>y&&r.push(new ht(Fo(p,y),Fo(p,qa(v,f,o))))}r.length||r.push(new ht(n,n)),Tt(u,dt(d.ranges.slice(0,h).concat(r),h),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b=c,_=b.anchor,w=e;if("single"!=i){if("double"==i)var x=t.findWordAt(e);else x=new ht(Fo(e.line,0),mt(u,Fo(e.line+1,0)));Bo(x.anchor,_)>0?(w=x.head,_=G(b.from(),x.anchor)):(w=x.anchor,_=$(b.to(),x.head))}(r=d.ranges.slice(0))[h]=new ht(mt(u,_),w),Tt(u,dt(r,h),Fa)}}function a(e){var n=++y,r=Ze(t,e,!0,"rect"==i);if(r)if(0!=Bo(r,g)){t.curOp.focus=Vr(),o(r);var s=_(l,u);(r.line>=s.to||r.line<s.from)&&setTimeout(Le(t,(function(){y==n&&a(e)})),150)}else{var c=e.clientY<v.top?-20:e.clientY>v.bottom?20:0;c&&setTimeout(Le(t,(function(){y==n&&(l.scroller.scrollTop+=c,a(e))})),50)}}function s(e){t.state.selectingText=!1,y=1/0,Oa(e),l.input.focus(),Pa(document,"mousemove",b),Pa(document,"mouseup",w),u.history.lastSelOrigin=null}var l=t.display,u=t.doc;Oa(e);var c,h,d=u.sel,f=d.ranges;if(r&&!e.shiftKey?(h=u.sel.contains(n),c=h>-1?f[h]:new ht(n,n)):(c=u.sel.primary(),h=u.sel.primIndex),Mo?e.shiftKey&&e.metaKey:e.altKey)i="rect",r||(c=new ht(n,n)),n=Ze(t,e,!0,!0),h=-1;else if("double"==i){var p=t.findWordAt(n);c=t.display.shift||u.extend?bt(u,c,p.anchor,p.head):p}else if("triple"==i){var m=new ht(Fo(n.line,0),mt(u,Fo(n.line+1,0)));c=t.display.shift||u.extend?bt(u,c,m.anchor,m.head):m}else c=bt(u,c,n);r?-1==h?(h=f.length,Tt(u,dt(f.concat([c]),h),{scroll:!1,origin:"*mouse"})):f.length>1&&f[h].empty()&&"single"==i&&!e.shiftKey?(Tt(u,dt(f.slice(0,h).concat(f.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),d=u.sel):xt(u,h,c,Fa):(h=0,Tt(u,new ct([c],0),Fa),d=u.sel);var g=n,v=l.wrapper.getBoundingClientRect(),y=0,b=Le(t,(function(t){xr(t)?a(t):s(t)})),w=Le(t,s);t.state.selectingText=w,La(document,"mousemove",b),La(document,"mouseup",w)}function Xe(t,e,n,i){try{var r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&Oa(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Er(t,n))return _r(e);o-=s.top-a.viewOffset;for(var l=0;l<t.options.gutters.length;++l){var u=a.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=r){var c=nr(t.doc,o),h=t.options.gutters[l];return Na(t,n,t,c,h,e),_r(e)}}}function Je(t,e){return Xe(t,e,"gutterClick",!0)}function Qe(t){var e=this;if(nn(e),!Tr(e,t)&&!Ve(e.display,t)){Oa(t),bo&&(Yo=+new Date);var n=Ze(e,t,!0),i=t.dataTransfer.files;if(n&&!e.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),a=0,s=function(t,i){if(!e.options.allowDropFileTypes||-1!=Nr(e.options.allowDropFileTypes,t.type)){var s=new FileReader;s.onload=Le(e,(function(){var t=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),o[i]=t,++a==r){var l={from:n=mt(e.doc,n),to:n,text:e.doc.splitLines(o.join(e.doc.lineSeparator())),origin:"paste"};Tn(e.doc,l),Ct(e.doc,ft(n,Qo(l)))}})),s.readAsText(t)}},l=0;r>l;++l)s(i[l],l);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout((function(){e.display.input.focus()}),20);try{if(o=t.dataTransfer.getData("Text")){if(e.state.draggingText&&!(Lo?t.altKey:t.ctrlKey))var u=e.listSelections();if(Ot(e.doc,ft(n,n)),u)for(l=0;l<u.length;++l)Pn(e.doc,"",u[l].anchor,u[l].head,"drag");e.replaceSelection(o,"around","paste"),e.display.input.focus()}}catch(t){}}}}function tn(t,e){if(bo&&(!t.state.draggingText||+new Date-Yo<100))Aa(e);else if(!Tr(t,e)&&!Ve(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!Co)){var n=Hr("img",null,null,"position: fixed; left: 0; top: 0;");n.src="",So&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),So&&n.parentNode.removeChild(n)}}function en(t,e){var n=Ze(t,e);if(n){var i=document.createDocumentFragment();It(t,n,i),t.display.dragCursor||(t.display.dragCursor=Hr("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),Ur(t.display.dragCursor,i)}}function nn(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function rn(t,e){Math.abs(t.doc.scrollTop-e)<2||(t.doc.scrollTop=e,go||A(t,{top:e}),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e),t.display.scrollbars.setScrollTop(e),go&&A(t),Bt(t,100))}function on(t,e,n){(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)||(e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),t.doc.scrollLeft=e,w(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function an(t,e){var n=Ko(e),i=n.x,r=n.y,o=t.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(i&&s||r&&l){if(r&&Lo&&wo)t:for(var u=e.target,c=o.view;u!=a;u=u.parentNode)for(var h=0;h<c.length;h++)if(c[h].node==u){t.display.currentWheelTarget=u;break t}if(i&&!go&&!So&&null!=Go)return r&&l&&rn(t,Math.max(0,Math.min(a.scrollTop+r*Go,a.scrollHeight-a.clientHeight))),on(t,Math.max(0,Math.min(a.scrollLeft+i*Go,a.scrollWidth-a.clientWidth))),(!r||r&&l)&&Oa(e),void(o.wheelStartX=null);if(r&&null!=Go){var d=r*Go,f=t.doc.scrollTop,p=f+o.wrapper.clientHeight;0>d?f=Math.max(0,f+d-50):p=Math.min(t.doc.height,p+d+50),A(t,{top:f,bottom:p})}20>$o&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=i,o.wheelDY=r,setTimeout((function(){if(null!=o.wheelStartX){var t=a.scrollLeft-o.wheelStartX,e=a.scrollTop-o.wheelStartY,n=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Go=(Go*$o+n)/($o+1),++$o)}}),200)):(o.wheelDX+=i,o.wheelDY+=r))}}function sn(t,e,n){if("string"==typeof e&&!(e=ca[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=Ia}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function ln(t,e,n){for(var i=0;i<t.state.keyMaps.length;i++){var r=da(e,t.state.keyMaps[i],n,t);if(r)return r}return t.options.extraKeys&&da(e,t.options.extraKeys,n,t)||da(e,t.options.keyMap,n,t)}function un(t,e,n,i){var r=t.state.keySeq;if(r){if(fa(e))return"handled";Xo.set(50,(function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())})),e=r+" "+e}var o=ln(t,e,i);return"multi"==o&&(t.state.keySeq=e),"handled"==o&&Sr(t,"keyHandled",t,e,n),"handled"!=o&&"multi"!=o||(Oa(n),Ft(t)),r&&!o&&/\'$/.test(e)?(Oa(n),!0):!!o}function cn(t,e){var n=pa(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?un(t,"Shift-"+n,e,(function(e){return sn(t,e,!0)}))||un(t,n,e,(function(e){return("string"==typeof e?/^go[A-Z]/.test(e):e.motion)?sn(t,e):void 0})):un(t,n,e,(function(e){return sn(t,e)})))}function hn(t,e,n){return un(t,"'"+n+"'",e,(function(e){return sn(t,e,!0)}))}function dn(t){var e=this;if(e.curOp.focus=Vr(),!Tr(e,t)){bo&&11>_o&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var i=cn(e,t);So&&(Jo=i?n:null,!i&&88==n&&!is&&(Lo?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||fn(e)}}function fn(t){function e(t){18!=t.keyCode&&t.altKey||(Xa(n,"CodeMirror-crosshair"),Pa(document,"keyup",e),Pa(document,"mouseover",e))}var n=t.display.lineDiv;Ja(n,"CodeMirror-crosshair"),La(document,"keyup",e),La(document,"mouseover",e)}function pn(t){16==t.keyCode&&(this.doc.sel.shift=!1),Tr(this,t)}function mn(t){var e=this;if(!(Ve(e.display,t)||Tr(e,t)||t.ctrlKey&&!t.altKey||Lo&&t.metaKey)){var n=t.keyCode,i=t.charCode;if(So&&n==Jo)return Jo=null,void Oa(t);So&&(!t.which||t.which<10)&&cn(e,t)||hn(e,t,String.fromCharCode(null==i?n:i))||e.display.input.onKeyPress(t)}}function gn(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,yn(t))}),100)}function vn(t){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Na(t,"focus",t),t.state.focused=!0,Ja(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),wo&&setTimeout((function(){t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Ft(t))}function yn(t){t.state.delayingBlurEvent||(t.state.focused&&(Na(t,"blur",t),t.state.focused=!1,Xa(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function bn(t,e){Ve(t.display,e)||_n(t,e)||Tr(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _n(t,e){return!!Er(t,"gutterContextMenu")&&Xe(t,e,"gutterContextMenu",!1)}function wn(t,e){if(Bo(t,e.from)<0)return t;if(Bo(t,e.to)<=0)return Qo(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=Qo(e).ch-e.to.ch),Fo(n,i)}function xn(t,e){for(var n=[],i=0;i<t.sel.ranges.length;i++){var r=t.sel.ranges[i];n.push(new ht(wn(r.anchor,e),wn(r.head,e)))}return dt(n,t.sel.primIndex)}function kn(t,e,n){return t.line==e.line?Fo(n.line,t.ch-e.ch+n.ch):Fo(n.line+(t.line-e.line),t.ch)}function Sn(t,e,n){for(var i=[],r=Fo(t.first,0),o=r,a=0;a<e.length;a++){var s=e[a],l=kn(s.from,r,o),u=kn(Qo(s),r,o);if(r=s.to,o=u,"around"==n){var c=t.sel.ranges[a],h=Bo(c.head,c.anchor)<0;i[a]=new ht(h?u:l,h?l:u)}else i[a]=new ht(l,l)}return new ct(i,t.sel.primIndex)}function Cn(t,e,n){var i={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){this.canceled=!0}};return n&&(i.update=function(e,n,i,r){e&&(this.from=mt(t,e)),n&&(this.to=mt(t,n)),i&&(this.text=i),void 0!==r&&(this.origin=r)}),Na(t,"beforeChange",t,i),t.cm&&Na(t.cm,"beforeChange",t.cm,i),i.canceled?null:{from:i.from,to:i.to,text:i.text,origin:i.origin}}function Tn(t,e,n){if(t.cm){if(!t.cm.curOp)return Le(t.cm,Tn)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(Er(t,"beforeChange")||t.cm&&Er(t.cm,"beforeChange"))||(e=Cn(t,e,!0))){var i=Io&&!n&&li(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)On(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text});else On(t,e)}}function On(t,e){if(1!=e.text.length||""!=e.text[0]||0!=Bo(e.from,e.to)){var n=xn(t,e);ur(t,e,n,t.cm?t.cm.curOp.id:NaN),Ln(t,e,n,oi(t,e));var i=[];Gi(t,(function(t,n){n||-1!=Nr(i,t.history)||(br(t.history,e),i.push(t.history)),Ln(t,e,null,oi(t,e))}))}}function En(t,e,n){if(!t.cm||!t.cm.state.suppressEdits){for(var i,r=t.history,o=t.sel,a="undo"==e?r.done:r.undone,s="undo"==e?r.undone:r.done,l=0;l<a.length&&(i=a[l],n?!i.ranges||i.equals(t.sel):i.ranges);l++);if(l!=a.length){for(r.lastOrigin=r.lastSelOrigin=null;(i=a.pop()).ranges;){if(dr(i,s),n&&!i.equals(t.sel))return void Tt(t,i,{clearRedo:!1});o=i}var u=[];dr(o,s),s.push({changes:u,generation:r.generation}),r.generation=i.generation||++r.maxGeneration;var c=Er(t,"beforeChange")||t.cm&&Er(t.cm,"beforeChange");for(l=i.changes.length-1;l>=0;--l){var h=i.changes[l];if(h.origin=e,c&&!Cn(t,h,!1))return void(a.length=0);u.push(ar(t,h));var d=l?xn(t,h):Pr(a);Ln(t,h,d,si(t,h)),!l&&t.cm&&t.cm.scrollIntoView({from:h.from,to:Qo(h)});var f=[];Gi(t,(function(t,e){e||-1!=Nr(f,t.history)||(br(t.history,h),f.push(t.history)),Ln(t,h,null,si(t,h))}))}}}}function An(t,e){if(0!=e&&(t.first+=e,t.sel=new ct(Dr(t.sel.ranges,(function(t){return new ht(Fo(t.anchor.line+e,t.anchor.ch),Fo(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){je(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;i<n.viewTo;i++)Ie(t.cm,i,"gutter")}}function Ln(t,e,n,i){if(t.cm&&!t.cm.curOp)return Le(t.cm,Ln)(t,e,n,i);if(e.to.line<t.first)An(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var r=e.text.length-1-(t.first-e.from.line);An(t,r),e={from:Fo(t.first,0),to:Fo(e.to.line+r,e.to.ch),text:[Pr(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:Fo(o,Xi(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Ji(t,e.from,e.to),n||(n=xn(t,e)),t.cm?Mn(t.cm,e,i):Zi(t,e,i),Ot(t,n,Ra)}}function Mn(t,e,n){var i=t.doc,r=t.display,a=e.from,s=e.to,l=!1,u=a.line;t.options.lineWrapping||(u=er(yi(Xi(i,a.line))),i.iter(u,s.line+1,(function(t){return t==r.maxLine?(l=!0,!0):void 0}))),i.sel.contains(e.from,e.to)>-1&&Or(t),Zi(i,e,n,o(t)),t.options.lineWrapping||(i.iter(u,a.line+e.text.length,(function(t){var e=h(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,l=!1)})),l&&(t.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,a.line),Bt(t,400);var c=e.text.length-(s.line-a.line)-1;e.full?je(t):a.line!=s.line||1!=e.text.length||Vi(t.doc,e)?je(t,a.line,s.line+1,c):Ie(t,a.line,"text");var d=Er(t,"changes"),f=Er(t,"change");if(f||d){var p={from:a,to:s,text:e.text,removed:e.removed,origin:e.origin};f&&Sr(t,"change",t,p),d&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(p)}t.display.selForContextMenu=null}function Pn(t,e,n,i,r){if(i||(i=n),Bo(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Tn(t,{from:n,to:i,text:e,origin:r})}function Nn(t,e){if(!Tr(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!Oo){var o=Hr("div","​",null,"position: absolute; top: "+(e.top-n.viewOffset-Wt(t.display))+"px; height: "+(e.bottom-e.top+Zt(t)+n.barHeight)+"px; left: "+e.left+"px; width: 2px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}function Dn(t,e,n,i){null==i&&(i=0);for(var r=0;5>r;r++){var o=!1,a=fe(t,e),s=n&&n!=e?fe(t,n):a,l=In(t,Math.min(a.left,s.left),Math.min(a.top,s.top)-i,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+i),u=t.doc.scrollTop,c=t.doc.scrollLeft;if(null!=l.scrollTop&&(rn(t,l.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(on(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function jn(t,e,n,i,r){var o=In(t,e,n,i,r);null!=o.scrollTop&&rn(t,o.scrollTop),null!=o.scrollLeft&&on(t,o.scrollLeft)}function In(t,e,n,i,r){var o=t.display,a=ye(t.display);0>n&&(n=0);var s=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:o.scroller.scrollTop,l=$t(t),u={};r-n>l&&(r=n+l);var c=t.doc.height+Ut(o),h=a>n,d=r>c-a;if(s>n)u.scrollTop=h?0:n;else if(r>s+l){var f=Math.min(n,(d?c:r)-l);f!=s&&(u.scrollTop=f)}var p=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:o.scroller.scrollLeft,m=Yt(t)-(t.options.fixedGutter?o.gutters.offsetWidth:0),g=i-e>m;return g&&(i=e+m),10>e?u.scrollLeft=0:p>e?u.scrollLeft=Math.max(0,e-(g?0:10)):i>m+p-3&&(u.scrollLeft=i+(g?0:10)-m),u}function Rn(t,e,n){null==e&&null==n||Bn(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=n&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+n)}function Fn(t){Bn(t);var e=t.getCursor(),n=e,i=e;t.options.lineWrapping||(n=e.ch?Fo(e.line,e.ch-1):e,i=Fo(e.line,e.ch+1)),t.curOp.scrollToPos={from:n,to:i,margin:t.options.cursorScrollMargin,isCursor:!0}}function Bn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=pe(t,e.from),i=pe(t,e.to),r=In(t,Math.min(n.left,i.left),Math.min(n.top,i.top)-e.margin,Math.max(n.right,i.right),Math.max(n.bottom,i.bottom)+e.margin);t.scrollTo(r.scrollLeft,r.scrollTop)}}function zn(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=Ht(t,e):n="prev");var a=t.options.tabSize,s=Xi(o,e),l=za(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(r,s.text.slice(c.length),s.text))==Ia||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=e>o.first?za(Xi(o,e-1).text,null,a):0:"add"==n?u=l+t.options.indentUnit:"subtract"==n?u=l-t.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)d+=a,h+="\t";if(u>d&&(h+=Mr(u-d)),h!=c)return Pn(o,h,Fo(e,0),Fo(e,c.length),"+input"),s.stateAfter=null,!0;for(f=0;f<o.sel.ranges.length;f++){var p=o.sel.ranges[f];if(p.head.line==e&&p.head.ch<c.length){xt(o,f,new ht(d=Fo(e,c.length),d));break}}}function qn(t,e,n,i){var r=e,o=e;return"number"==typeof e?o=Xi(t,pt(t,e)):r=er(e),null==r?null:(i(o,r)&&t.cm&&Ie(t.cm,r,n),o)}function Hn(t,e){for(var n=t.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=e(n[r]);i.length&&Bo(o.from,Pr(i).to)<=0;){var a=i.pop();if(Bo(a.from,o.from)<0){o.from=a.from;break}}i.push(o)}Ae(t,(function(){for(var e=i.length-1;e>=0;e--)Pn(t.doc,"",i[e].from,i[e].to,"+delete");Fn(t)}))}function Wn(t,e,n,i,r){function o(){var e=s+n;return!(e<t.first||e>=t.first+t.size)&&(s=e,c=Xi(t,e))}function a(t){var e=(r?ho:fo)(c,l,n,!0);if(null==e){if(t||!o())return!1;l=r?(0>n?ro:io)(c):0>n?c.text.length:0}else l=e;return!0}var s=e.line,l=e.ch,u=n,c=Xi(t,s);if("char"==i)a();else if("column"==i)a(!0);else if("word"==i||"group"==i)for(var h=null,d="group"==i,f=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(0>n)||a(!p);p=!1){var m=c.text.charAt(l)||"\n",g=Br(m,f)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||p||g||(g="s"),h&&h!=g){0>n&&(n=1,a());break}if(g&&(h=g),n>0&&!a(!p))break}var v=Pt(t,Fo(s,l),e,u,!0);return Bo(e,v)||(v.hitSide=!0),v}function Un(t,e,n,i){var r,o=t.doc,a=e.left;if("page"==i){var s=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);r=e.top+n*(s-(0>n?1.5:.5)*ye(t.display))}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;;){var l=ge(t,a,r);if(!l.outside)break;if(0>n?0>=r:r>=o.height){l.hitSide=!0;break}r+=5*n}return l}function Vn(e,n,i,r){t.defaults[e]=n,i&&(ea[e]=r?function(t,e,n){n!=na&&i(t,e,n)}:i)}function Zn(t){for(var e,n,i,r,o=t.split(/-(?!$)/),a=(t=o[o.length-1],0);a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))r=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),r&&(t="Cmd-"+t),i&&(t="Shift-"+t),t}function Yn(t){return"string"==typeof t?ha[t]:t}function $n(t,e,n,i,r){if(i&&i.shared)return Gn(t,e,n,i,r);if(t.cm&&!t.cm.curOp)return Le(t.cm,$n)(t,e,n,i,r);var o=new va(t,r),a=Bo(e,n);if(i&&Rr(i,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Hr("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vi(t,e.line,e,n,o)||e.line!=n.line&&vi(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ro=!0}o.addToHistory&&ur(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,u=t.cm;if(t.iter(l,n.line+1,(function(t){u&&o.collapsed&&!u.options.lineWrapping&&yi(t)==u.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&tr(t,0),ni(t,new Qn(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){xi(t,e)&&tr(e,0)})),o.clearOnEnter&&La(o,"beforeCursorEnter",(function(){o.clear()})),o.readOnly&&(Io=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++ga,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)je(u,e.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=e.line;c<=n.line;c++)Ie(u,c,"text");o.atomic&&At(u.doc),Sr(u,"markerAdded",u,o)}return o}function Gn(t,e,n,i,r){(i=Rr(i)).shared=!1;var o=[$n(t,e,n,i,r)],a=o[0],s=i.widgetNode;return Gi(t,(function(t){s&&(i.widgetNode=s.cloneNode(!0)),o.push($n(t,mt(t,e),mt(t,n),i,r));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;a=Pr(o)})),new ya(o,a)}function Kn(t){return t.findMarks(Fo(t.first,0),t.clipPos(Fo(t.lastLine())),(function(t){return t.parent}))}function Xn(t,e){for(var n=0;n<e.length;n++){var i=e[n],r=i.find(),o=t.clipPos(r.from),a=t.clipPos(r.to);if(Bo(o,a)){var s=$n(t,o,a,i.primary,i.primary.type);i.markers.push(s),s.parent=i}}}function Jn(t){for(var e=0;e<t.length;e++){var n=t[e],i=[n.primary.doc];Gi(n.primary.doc,(function(t){i.push(t)}));for(var r=0;r<n.markers.length;r++){var o=n.markers[r];-1==Nr(i,o.doc)&&(o.parent=null,n.markers.splice(r--,1))}}}function Qn(t,e,n){this.marker=t,this.from=e,this.to=n}function ti(t,e){if(t)for(var n=0;n<t.length;++n){var i=t[n];if(i.marker==e)return i}}function ei(t,e){for(var n,i=0;i<t.length;++i)t[i]!=e&&(n||(n=[])).push(t[i]);return n}function ni(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}function ii(t,e,n){if(t)for(var i,r=0;r<t.length;++r){var o=t[r],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e)||o.from==e&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=e:o.to>e);(i||(i=[])).push(new Qn(a,o.from,s?null:o.to))}}return i}function ri(t,e,n){if(t)for(var i,r=0;r<t.length;++r){var o=t[r],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e);(i||(i=[])).push(new Qn(a,s?null:o.from-e,null==o.to?null:o.to-e))}}return i}function oi(t,e){if(e.full)return null;var n=vt(t,e.from.line)&&Xi(t,e.from.line).markedSpans,i=vt(t,e.to.line)&&Xi(t,e.to.line).markedSpans;if(!n&&!i)return null;var r=e.from.ch,o=e.to.ch,a=0==Bo(e.from,e.to),s=ii(n,r,a),l=ri(i,o,a),u=1==e.text.length,c=Pr(e.text).length+(u?r:0);if(s)for(var h=0;h<s.length;++h)null==(d=s[h]).to&&((f=ti(l,d.marker))?u&&(d.to=null==f.to?null:f.to+c):d.to=r);if(l)for(h=0;h<l.length;++h){var d,f;null!=(d=l[h]).to&&(d.to+=c),null==d.from?(f=ti(s,d.marker))||(d.from=c,u&&(s||(s=[])).push(d)):(d.from+=c,u&&(s||(s=[])).push(d))}s&&(s=ai(s)),l&&l!=s&&(l=ai(l));var p=[s];if(!u){var m,g=e.text.length-2;if(g>0&&s)for(h=0;h<s.length;++h)null==s[h].to&&(m||(m=[])).push(new Qn(s[h].marker,null,null));for(h=0;g>h;++h)p.push(m);p.push(l)}return p}function ai(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function si(t,e){var n=mr(t,e),i=oi(t,e);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],a=i[r];if(o&&a)t:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue t;o.push(l)}else a&&(n[r]=a)}return n}function li(t,e,n){var i=null;if(t.iter(e.line,n.line+1,(function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||i&&-1!=Nr(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var r=[{from:e,to:n}],o=0;o<i.length;++o)for(var a=i[o],s=a.find(0),l=0;l<r.length;++l){var u=r[l];if(!(Bo(u.to,s.from)<0||Bo(u.from,s.to)>0)){var c=[l,1],h=Bo(u.from,s.from),d=Bo(u.to,s.to);(0>h||!a.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),r.splice.apply(r,c),l+=c.length-1}}return r}function ui(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function ci(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function hi(t){return t.inclusiveLeft?-1:0}function di(t){return t.inclusiveRight?1:0}function fi(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var i=t.find(),r=e.find(),o=Bo(i.from,r.from)||hi(t)-hi(e);if(o)return-o;var a=Bo(i.to,r.to)||di(t)-di(e);return a||e.id-t.id}function pi(t,e){var n,i=Ro&&t.markedSpans;if(i)for(var r,o=0;o<i.length;++o)(r=i[o]).marker.collapsed&&null==(e?r.from:r.to)&&(!n||fi(n,r.marker)<0)&&(n=r.marker);return n}function mi(t){return pi(t,!0)}function gi(t){return pi(t,!1)}function vi(t,e,n,i,r){var o=Xi(t,e),a=Ro&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=Bo(u.from,n)||hi(l.marker)-hi(r),h=Bo(u.to,i)||di(l.marker)-di(r);if(!(c>=0&&0>=h||0>=c&&h>=0)&&(0>=c&&(l.marker.inclusiveRight&&r.inclusiveLeft?Bo(u.to,n)>=0:Bo(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?Bo(u.from,i)<=0:Bo(u.from,i)<0)))return!0}}}function yi(t){for(var e;e=mi(t);)t=e.find(-1,!0).line;return t}function bi(t){for(var e,n;e=gi(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function _i(t,e){var n=Xi(t,e),i=yi(n);return n==i?e:er(i)}function wi(t,e){if(e>t.lastLine())return e;var n,i=Xi(t,e);if(!xi(t,i))return e;for(;n=gi(i);)i=n.find(1,!0).line;return er(i)+1}function xi(t,e){var n=Ro&&e.markedSpans;if(n)for(var i,r=0;r<n.length;++r)if((i=n[r]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&ki(t,e,i))return!0}}function ki(t,e,n){if(null==n.to){var i=n.marker.find(1,!0);return ki(t,i.line,ti(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var r,o=0;o<e.markedSpans.length;++o)if((r=e.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&ki(t,e,r))return!0}function Si(t,e,n){ir(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Rn(t,null,n)}function Ci(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!$a(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),Ur(e.display.measure,Hr("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function Ti(t,e,n,i){var r=new ba(t,n,i),o=t.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),qn(t,e,"widget",(function(e){var n=e.widgets||(e.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length-1,Math.max(0,r.insertAt)),0,r),r.line=e,o&&!xi(t,e)){var i=ir(e)<t.scrollTop;tr(e,e.height+Ci(r)),i&&Rn(o,null,r.height),o.curOp.forceUpdate=!0}return!0})),r}function Oi(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),ui(t),ci(t,n);var r=i?i(t):1;r!=t.height&&tr(t,r)}function Ei(t){t.parent=null,ui(t)}function Ai(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==e[i]?e[i]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(e[i])||(e[i]+=" "+n[2])}return t}function Li(e,n){if(e.blankLine)return e.blankLine(n);if(e.innerMode){var i=t.innerMode(e,n);return i.mode.blankLine?i.mode.blankLine(i.state):void 0}}function Mi(e,n,i,r){for(var o=0;10>o;o++){r&&(r[0]=t.innerMode(e,i).mode);var a=e.token(n,i);if(n.pos>n.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}function Pi(t,e,n,i){function r(t){return{start:h.start,end:h.pos,string:h.current(),type:o||null,state:t?la(a.mode,c):c}}var o,a=t.doc,s=a.mode;e=mt(a,e);var l,u=Xi(a,e.line),c=Ht(t,e.line,n),h=new ma(u.text,t.options.tabSize);for(i&&(l=[]);(i||h.pos<e.ch)&&!h.eol();)h.start=h.pos,o=Mi(s,h,c),i&&l.push(r(!0));return i?l:r()}function Ni(t,e,n,i,r,o,a){var s=n.flattenSpans;null==s&&(s=t.options.flattenSpans);var l,u=0,c=null,h=new ma(e,t.options.tabSize),d=t.options.addModeClass&&[null];for(""==e&&Ai(Li(n,i),o);!h.eol();){if(h.pos>t.options.maxHighlightLength?(s=!1,a&&Ii(t,e,i,h.pos),h.pos=e.length,l=null):l=Ai(Mi(n,h,i,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;u<h.start;)r(u=Math.min(h.start,u+5e4),c);c=l}h.start=h.pos}for(;u<h.pos;){var p=Math.min(h.pos,u+5e4);r(p,c),u=p}}function Di(t,e,n,i){var r=[t.state.modeGen],o={};Ni(t,e.text,t.doc.mode,n,(function(t,e){r.push(t,e)}),o,i);for(var a=0;a<t.state.overlays.length;++a){var s=t.state.overlays[a],l=1,u=0;Ni(t,e.text,s.mode,!0,(function(t,e){for(var n=l;t>u;){var i=r[l];i>t&&r.splice(l,1,t,r[l+1],i),l+=2,u=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,l-n,t,"cm-overlay "+e),l=n+2;else for(;l>n;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"cm-overlay "+e}}),o)}return{styles:r,classes:o.bgClass||o.textClass?o:null}}function ji(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=Ht(t,er(e)),r=Di(t,e,e.text.length>t.options.maxHighlightLength?la(t.doc.mode,i):i);e.stateAfter=i,e.styles=r.styles,r.classes?e.styleClasses=r.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.frontier&&t.doc.frontier++}return e.styles}function Ii(t,e,n,i){var r=t.doc.mode,o=new ma(e,t.options.tabSize);for(o.start=o.pos=i||0,""==e&&Li(r,n);!o.eol();)Mi(r,o,n),o.start=o.pos}function Ri(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?xa:wa;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Fi(t,e){var n=Hr("span",null,null,wo?"padding-right: .1px":null),i={pre:Hr("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,splitSpaces:(bo||wo)&&t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var o,a=r?e.rest[r-1]:e.line;i.pos=0,i.addToken=zi,Jr(t.display.measure)&&(o=rr(a))&&(i.addToken=Hi(i.addToken,o)),i.map=[],Ui(a,i,ji(t,a,e!=t.display.externalMeasured&&er(a))),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=Yr(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=Yr(a.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Xr(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(wo){var s=i.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Na(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=Yr(i.pre.className,i.textClass||"")),i}function Bi(t){var e=Hr("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function zi(t,e,n,i,r,o,a){if(e){var s=t.splitSpaces?e.replace(/ {3,}/g,qi):e,l=t.cm.state.specialChars,u=!1;if(l.test(e))for(var c=document.createDocumentFragment(),h=0;;){l.lastIndex=h;var d=l.exec(e),f=d?d.index-h:e.length-h;if(f){var p=document.createTextNode(s.slice(h,h+f));bo&&9>_o?c.appendChild(Hr("span",[p])):c.appendChild(p),t.map.push(t.pos,t.pos+f,p),t.col+=f,t.pos+=f}if(!d)break;if(h+=f+1,"\t"==d[0]){var m=t.cm.options.tabSize,g=m-t.col%m;(p=c.appendChild(Hr("span",Mr(g),"cm-tab"))).setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),t.col+=g}else"\r"==d[0]||"\n"==d[0]?((p=c.appendChild(Hr("span","\r"==d[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",d[0]),t.col+=1):((p=t.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),bo&&9>_o?c.appendChild(Hr("span",[p])):c.appendChild(p),t.col+=1);t.map.push(t.pos,t.pos+1,p),t.pos++}else t.col+=e.length,c=document.createTextNode(s),t.map.push(t.pos,t.pos+e.length,c),bo&&9>_o&&(u=!0),t.pos+=e.length;if(n||i||r||u||a){var v=n||"";i&&(v+=i),r&&(v+=r);var y=Hr("span",[c],v,a);return o&&(y.title=o),t.content.appendChild(y)}t.content.appendChild(c)}}function qi(t){for(var e=" ",n=0;n<t.length-2;++n)e+=n%2?" ":" ";return e+" "}function Hi(t,e){return function(n,i,r,o,a,s,l){r=r?r+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+i.length;;){for(var h=0;h<e.length;h++){var d=e[h];if(d.to>u&&d.from<=u)break}if(d.to>=c)return t(n,i,r,o,a,s,l);t(n,i.slice(0,d.to-u),r,o,null,s,l),o=null,i=i.slice(d.to-u),u=d.to}}}function Wi(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e}function Ui(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var a,s,l,u,c,h,d,f=r.length,p=0,m=1,g="",v=0;;){if(v==p){l=u=c=h=s="",d=null,v=1/0;for(var y,b=[],_=0;_<i.length;++_){var w=i[_],x=w.marker;"bookmark"==x.type&&w.from==p&&x.widgetNode?b.push(x):w.from<=p&&(null==w.to||w.to>p||x.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==p&&(c+=" "+x.startStyle),x.endStyle&&w.to==v&&(y||(y=[])).push(x.endStyle,w.to),x.title&&!h&&(h=x.title),x.collapsed&&(!d||fi(d.marker,x)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(y)for(_=0;_<y.length;_+=2)y[_+1]==v&&(u+=" "+y[_]);if(!d||d.from==p)for(_=0;_<b.length;++_)Wi(e,0,b[_]);if(d&&(d.from||0)==p){if(Wi(e,(null==d.to?f+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=f)break;for(var k=Math.min(f,v);;){if(g){var S=p+g.length;if(!d){var C=S>k?g.slice(0,k-p):g;e.addToken(e,C,a?a+l:l,c,p+C.length==v?u:"",h,s)}if(S>=k){g=g.slice(k-p),p=k;break}p=S,c=""}g=r.slice(o,o=n[m++]),a=Ri(n[m++],e.cm.options)}}else for(m=1;m<n.length;m+=2)e.addToken(e,r.slice(o,o=n[m]),Ri(n[m+1],e.cm.options))}function Vi(t,e){return 0==e.from.ch&&0==e.to.ch&&""==Pr(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Zi(t,e,n,i){function r(t){return n?n[t]:null}function o(t,n,r){Oi(t,n,r,i),Sr(t,"change",t,e)}function a(t,e){for(var n=t,o=[];e>n;++n)o.push(new _a(u[n],r(n),i));return o}var s=e.from,l=e.to,u=e.text,c=Xi(t,s.line),h=Xi(t,l.line),d=Pr(u),f=r(u.length-1),p=l.line-s.line;if(e.full)t.insert(0,a(0,u.length)),t.remove(u.length,t.size-u.length);else if(Vi(t,e)){var m=a(0,u.length-1);o(h,h.text,f),p&&t.remove(s.line,p),m.length&&t.insert(s.line,m)}else c==h?1==u.length?o(c,c.text.slice(0,s.ch)+d+c.text.slice(l.ch),f):((m=a(1,u.length-1)).push(new _a(d+c.text.slice(l.ch),f,i)),o(c,c.text.slice(0,s.ch)+u[0],r(0)),t.insert(s.line+1,m)):1==u.length?(o(c,c.text.slice(0,s.ch)+u[0]+h.text.slice(l.ch),r(0)),t.remove(s.line+1,p)):(o(c,c.text.slice(0,s.ch)+u[0],r(0)),o(h,d+h.text.slice(l.ch),f),m=a(1,u.length-1),p>1&&t.remove(s.line+1,p-1),t.insert(s.line+1,m));Sr(t,"change",t,e)}function Yi(t){this.lines=t,this.parent=null;for(var e=0,n=0;e<t.length;++e)t[e].parent=this,n+=t[e].height;this.height=n}function $i(t){this.children=t;for(var e=0,n=0,i=0;i<t.length;++i){var r=t[i];e+=r.chunkSize(),n+=r.height,r.parent=this}this.size=e,this.height=n,this.parent=null}function Gi(t,e,n){function i(t,r,o){if(t.linked)for(var a=0;a<t.linked.length;++a){var s=t.linked[a];if(s.doc!=r){var l=o&&s.sharedHist;n&&!l||(e(s.doc,l),i(s.doc,t,l))}}}i(t,null,!0)}function Ki(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,a(t),n(t),t.options.lineWrapping||d(t),t.options.mode=e.modeOption,je(t)}function Xi(t,e){if(0>(e-=t.first)||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(o>e){n=r;break}e-=o}return n.lines[e]}function Ji(t,e,n){var i=[],r=e.line;return t.iter(e.line,n.line+1,(function(t){var o=t.text;r==n.line&&(o=o.slice(0,n.ch)),r==e.line&&(o=o.slice(e.ch)),i.push(o),++r})),i}function Qi(t,e,n){var i=[];return t.iter(e,n,(function(t){i.push(t.text)})),i}function tr(t,e){var n=e-t.height;if(n)for(var i=t;i;i=i.parent)i.height+=n}function er(t){if(null==t.parent)return null;for(var e=t.parent,n=Nr(e.lines,t),i=e.parent;i;e=i,i=i.parent)for(var r=0;i.children[r]!=e;++r)n+=i.children[r].chunkSize();return n+e.first}function nr(t,e){var n=t.first;t:do{for(var i=0;i<t.children.length;++i){var r=t.children[i],o=r.height;if(o>e){t=r;continue t}e-=o,n+=r.chunkSize()}return n}while(!t.lines);for(i=0;i<t.lines.length;++i){var a=t.lines[i].height;if(a>e)break;e-=a}return n+i}function ir(t){for(var e=0,n=(t=yi(t)).parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==t)break;e+=r.height}for(var o=n.parent;o;o=(n=o).parent)for(i=0;i<o.children.length;++i){var a=o.children[i];if(a==n)break;e+=a.height}return e}function rr(t){var e=t.order;return null==e&&(e=t.order=ss(t.text)),e}function or(t){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function ar(t,e){var n={from:Y(e.from),to:Qo(e),text:Ji(t,e.from,e.to)};return fr(t,n,e.from.line,e.to.line+1),Gi(t,(function(t){fr(t,n,e.from.line,e.to.line+1)}),!0),n}function sr(t){for(;t.length&&Pr(t).ranges;)t.pop()}function lr(t,e){return e?(sr(t.done),Pr(t.done)):t.done.length&&!Pr(t.done).ranges?Pr(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Pr(t.done)):void 0}function ur(t,e,n,i){var r=t.history;r.undone.length=0;var o,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=lr(r,r.lastOp==i))){var s=Pr(o.changes);0==Bo(e.from,e.to)&&0==Bo(e.from,s.to)?s.to=Qo(e):o.changes.push(ar(t,e))}else{var l=Pr(r.done);for(l&&l.ranges||dr(t.sel,r.done),o={changes:[ar(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,s||Na(t,"historyAdded")}function cr(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function hr(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||cr(t,o,Pr(r.done),e))?r.done[r.done.length-1]=e:dr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&sr(r.undone)}function dr(t,e){var n=Pr(e);n&&n.ranges&&n.equals(t)||e.push(t)}function fr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),(function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function pr(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function mr(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var i=0,r=[];i<e.text.length;++i)r.push(pr(n[i]));return r}function gr(t,e,n){for(var i=0,r=[];i<t.length;++i){var o=t[i];if(o.ranges)r.push(n?ct.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var u,c=a[l];if(s.push({from:c.from,to:c.to,text:c.text}),e)for(var h in c)(u=h.match(/^spans_(\d+)$/))&&Nr(e,Number(u[1]))>-1&&(Pr(s)[h]=c[h],delete c[h])}}}return r}function vr(t,e,n,i){n<t.line?t.line+=i:e<t.line&&(t.line=e,t.ch=0)}function yr(t,e,n,i){for(var r=0;r<t.length;++r){var o=t[r],a=!0;if(o.ranges){o.copied||((o=t[r]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)vr(o.ranges[s].anchor,e,n,i),vr(o.ranges[s].head,e,n,i)}else{for(s=0;s<o.changes.length;++s){var l=o.changes[s];if(n<l.from.line)l.from=Fo(l.from.line+i,l.from.ch),l.to=Fo(l.to.line+i,l.to.ch);else if(e<=l.to.line){a=!1;break}}a||(t.splice(0,r+1),r=0)}}}function br(t,e){var n=e.from.line,i=e.to.line,r=e.text.length-(i-n)-1;yr(t.done,n,i,r),yr(t.undone,n,i,r)}function _r(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function wr(t){return t.target||t.srcElement}function xr(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),Lo&&t.ctrlKey&&1==e&&(e=3),e}function kr(t,e,n){var i=t._handlers&&t._handlers[e];return n?i&&i.length>0?i.slice():Ma:i||Ma}function Sr(t,e){function n(t){return function(){t.apply(null,o)}}var i=kr(t,e,!1);if(i.length){var r,o=Array.prototype.slice.call(arguments,2);Vo?r=Vo.delayedCallbacks:Da?r=Da:(r=Da=[],setTimeout(Cr,0));for(var a=0;a<i.length;++a)r.push(n(i[a]))}}function Cr(){var t=Da;Da=null;for(var e=0;e<t.length;++e)t[e]()}function Tr(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),Na(t,n||e.type,t,e),_r(e)||e.codemirrorIgnore}function Or(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),i=0;i<e.length;++i)-1==Nr(n,e[i])&&n.push(e[i])}function Er(t,e){return kr(t,e).length>0}function Ar(t){t.prototype.on=function(t,e){La(this,t,e)},t.prototype.off=function(t,e){Pa(this,t,e)}}function Lr(){this.id=null}function Mr(t){for(;Ha.length<=t;)Ha.push(Pr(Ha)+" ");return Ha[t]}function Pr(t){return t[t.length-1]}function Nr(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}function Dr(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i],i);return n}function jr(){}function Ir(t,e){var n;return Object.create?n=Object.create(t):(jr.prototype=t,n=new jr),e&&Rr(e,n),n}function Rr(t,e,n){for(var i in e||(e={}),t)!t.hasOwnProperty(i)||!1===n&&e.hasOwnProperty(i)||(e[i]=t[i]);return e}function Fr(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function Br(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Za(t))||e.test(t):Za(t)}function zr(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function qr(t){return t.charCodeAt(0)>=768&&Ya.test(t)}function Hr(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)r.appendChild(e[o]);return r}function Wr(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function Ur(t,e){return Wr(t).appendChild(e)}function Vr(){for(var t=document.activeElement;t&&t.root&&t.root.activeElement;)t=t.root.activeElement;return t}function Zr(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function Yr(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!Zr(n[i]).test(e)&&(e+=" "+n[i]);return e}function $r(t){if(document.body.getElementsByClassName)for(var e=document.body.getElementsByClassName("CodeMirror"),n=0;n<e.length;n++){var i=e[n].CodeMirror;i&&t(i)}}function Gr(){Qa||(Kr(),Qa=!0)}function Kr(){var t;La(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,$r(Ue)}),100))})),La(window,"blur",(function(){$r(yn)}))}function Xr(t){if(null==Ga){var e=Hr("span","​");Ur(t,Hr("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Ga=e.offsetWidth<=1&&e.offsetHeight>2&&!(bo&&8>_o))}var n=Ga?Hr("span","​"):Hr("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Jr(t){if(null!=Ka)return Ka;var e=Ur(t,document.createTextNode("AخA")),n=Ua(e,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var i=Ua(e,1,2).getBoundingClientRect();return Ka=i.right-n.right<3}function Qr(t){if(null!=rs)return rs;var e=Ur(t,Hr("span","x")),n=e.getBoundingClientRect(),i=Ua(e,0,1).getBoundingClientRect();return rs=Math.abs(n.left-i.left)>1}function to(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;o<t.length;++o){var a=t[o];(a.from<n&&a.to>e||e==n&&a.to==e)&&(i(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function eo(t){return t.level%2?t.to:t.from}function no(t){return t.level%2?t.from:t.to}function io(t){var e=rr(t);return e?eo(e[0]):0}function ro(t){var e=rr(t);return e?no(Pr(e)):t.text.length}function oo(t,e){var n=Xi(t.doc,e),i=yi(n);i!=n&&(e=er(i));var r=rr(i),o=r?r[0].level%2?ro(i):io(i):0;return Fo(e,o)}function ao(t,e){for(var n,i=Xi(t.doc,e);n=gi(i);)i=n.find(1,!0).line,e=null;var r=rr(i),o=r?r[0].level%2?io(i):ro(i):i.text.length;return Fo(null==e?er(i):e,o)}function so(t,e){var n=oo(t,e.line),i=Xi(t.doc,n.line),r=rr(i);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),a=e.line==n.line&&e.ch<=o&&e.ch;return Fo(n.line,a?0:o)}return n}function lo(t,e,n){var i=t[0].level;return e==i||n!=i&&n>e}function uo(t,e){as=null;for(var n,i=0;i<t.length;++i){var r=t[i];if(r.from<e&&r.to>e)return i;if(r.from==e||r.to==e){if(null!=n)return lo(t,r.level,t[n].level)?(r.from!=r.to&&(as=n),i):(r.from!=r.to&&(as=i),n);n=i}}return n}function co(t,e,n,i){if(!i)return e+n;do{e+=n}while(e>0&&qr(t.text.charAt(e)));return e}function ho(t,e,n,i){var r=rr(t);if(!r)return fo(t,e,n,i);for(var o=uo(r,e),a=r[o],s=co(t,e,a.level%2?-n:n,i);;){if(s>a.from&&s<a.to)return s;if(s==a.from||s==a.to)return uo(r,s)==o?s:n>0==(a=r[o+=n]).level%2?a.to:a.from;if(!(a=r[o+=n]))return null;s=n>0==a.level%2?co(t,a.to,-1,i):co(t,a.from,1,i)}}function fo(t,e,n,i){var r=e+n;if(i)for(;r>0&&qr(t.text.charAt(r));)r+=n;return 0>r||r>t.text.length?null:r}var po=navigator.userAgent,mo=navigator.platform,go=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),bo=vo||yo,_o=bo&&(vo?document.documentMode||6:yo[1]),wo=/WebKit\//.test(po),xo=wo&&/Qt\/\d+\.\d+/.test(po),ko=/Chrome\//.test(po),So=/Opera\//.test(po),Co=/Apple Computer/.test(navigator.vendor),To=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),Oo=/PhantomJS/.test(po),Eo=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),Ao=Eo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),Lo=Eo||/Mac/.test(mo),Mo=/\bCrOS\b/.test(po),Po=/win/i.test(mo),No=So&&po.match(/Version\/(\d*\.\d*)/);No&&(No=Number(No[1])),No&&No>=15&&(So=!1,wo=!0);var Do=Lo&&(xo||So&&(null==No||12.11>No)),jo=go||bo&&_o>=9,Io=!1,Ro=!1;m.prototype=Rr({update:function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=t.scrollWidth-t.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},setScrollLeft:function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var t=Lo&&!To?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Lr,this.disableVert=new Lr},enableZeroWidthBar:function(t,e){function n(){var i=t.getBoundingClientRect();document.elementFromPoint(i.left+1,i.bottom-1)!=t?t.style.pointerEvents="none":e.set(1e3,n)}t.style.pointerEvents="auto",e.set(1e3,n)},clear:function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)}},m.prototype),g.prototype=Rr({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},g.prototype),t.scrollbarModel={native:m,null:g},C.prototype.signal=function(t,e){Er(t,e)&&this.events.push(arguments)},C.prototype.finish=function(){for(var t=0;t<this.events.length;t++)Na.apply(null,this.events[t])};var Fo=t.Pos=function(t,e){return this instanceof Fo?(this.line=t,void(this.ch=e)):new Fo(t,e)},Bo=t.cmpPos=function(t,e){return t.line-e.line||t.ch-e.ch},zo=null;nt.prototype=Rr({init:function(t){function e(t){if(!Tr(i,t)){if(i.somethingSelected())zo={lineWise:!1,text:i.getSelections()},n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,o.value=zo.text.join("\n"),Wa(o));else{if(!i.options.lineWiseCopyCut)return;var e=tt(i);zo={lineWise:!0,text:e.text},"cut"==t.type?i.setSelections(e.ranges,null,Ra):(n.prevInput="",o.value=e.text.join("\n"),Wa(o))}"cut"==t.type&&(i.state.cutIncoming=!0)}}var n=this,i=this.cm,r=this.wrapper=it(),o=this.textarea=r.firstChild;t.wrapper.insertBefore(r,t.wrapper.firstChild),Eo&&(o.style.width="0px"),La(o,"input",(function(){bo&&_o>=9&&n.hasSelection&&(n.hasSelection=null),n.poll()})),La(o,"paste",(function(t){Tr(i,t)||J(t,i)||(i.state.pasteIncoming=!0,n.fastPoll())})),La(o,"cut",e),La(o,"copy",e),La(t.scroller,"paste",(function(e){Ve(t,e)||Tr(i,e)||(i.state.pasteIncoming=!0,n.focus())})),La(t.lineSpace,"selectstart",(function(e){Ve(t,e)||Oa(e)})),La(o,"compositionstart",(function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}})),La(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},prepareSelection:function(){var t=this.cm,e=t.display,n=t.doc,i=jt(t);if(t.options.moveInputWithCursor){var r=fe(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+a.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+a.left-o.left))}return i},showSelection:function(t){var e=this.cm.display;Ur(e.cursorDiv,t.cursors),Ur(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},reset:function(t){if(!this.contextMenuPending){var e,n,i=this.cm,r=i.doc;if(i.somethingSelected()){this.prevInput="";var o=r.sel.primary(),a=(e=is&&(o.to().line-o.from().line>100||(n=i.getSelection()).length>1e3))?"-":n||i.getSelection();this.textarea.value=a,i.state.focused&&Wa(this.textarea),bo&&_o>=9&&(this.hasSelection=a)}else t||(this.prevInput=this.textarea.value="",bo&&_o>=9&&(this.hasSelection=null));this.inaccurateSelection=e}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ao||Vr()!=this.textarea))try{this.textarea.focus()}catch(t){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var t=this;t.pollingFast||t.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},fastPoll:function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},poll:function(){var t=this.cm,e=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ns(e)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=e.value;if(i==n&&!t.somethingSelected())return!1;if(bo&&_o>=9&&this.hasSelection===i||Lo&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var r=i.charCodeAt(0);if(8203!=r||n||(n="​"),8666==r)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,i.length);a>o&&n.charCodeAt(o)==i.charCodeAt(o);)++o;var s=this;return Ae(t,(function(){X(t,i.slice(o),n.length-o,null,s.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?e.value=s.prevInput="":s.prevInput=i,s.composing&&(s.composing.range.clear(),s.composing.range=t.markText(s.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&_o>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(t){function e(){if(null!=a.selectionStart){var t=r.somethingSelected(),e="​"+(t?a.value:"");a.value="⇚",a.value=e,i.prevInput=t?"":"​",a.selectionStart=1,a.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=c,a.style.cssText=u,bo&&9>_o&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!bo||bo&&9>_o)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==i.prevInput?Le(r,ca.selectAll)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,a=i.textarea,s=Ze(r,t),l=o.scroller.scrollTop;if(s&&!So){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(s)&&Le(r,Tt)(r.doc,ft(s),Ra);var u=a.style.cssText,c=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",wo)var d=window.scrollY;if(o.input.focus(),wo&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(a.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),bo&&_o>=9&&e(),jo){Aa(t);var f=function(){Pa(window,"mouseup",f),setTimeout(n,20)};La(window,"mouseup",f)}else setTimeout(n,50)}},readOnlyChanged:function(t){t||this.reset()},setUneditable:jr,needsContentAttribute:!1},nt.prototype),rt.prototype=Rr({init:function(t){function e(t){if(!Tr(i,t)){if(i.somethingSelected())zo={lineWise:!1,text:i.getSelections()},"cut"==t.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var e=tt(i);zo={lineWise:!0,text:e.text},"cut"==t.type&&i.operation((function(){i.setSelections(e.ranges,0,Ra),i.replaceSelection("",null,"cut")}))}if(t.clipboardData&&!Eo)t.preventDefault(),t.clipboardData.clearData(),t.clipboardData.setData("text/plain",zo.text.join("\n"));else{var n=it(),r=n.firstChild;i.display.lineSpace.insertBefore(n,i.display.lineSpace.firstChild),r.value=zo.text.join("\n");var o=document.activeElement;Wa(r),setTimeout((function(){i.display.lineSpace.removeChild(n),o.focus()}),50)}}}var n=this,i=n.cm,r=n.div=t.lineDiv;et(r),La(r,"paste",(function(t){Tr(i,t)||J(t,i)})),La(r,"compositionstart",(function(t){var e=t.data;if(n.composing={sel:i.doc.sel,data:e,startData:e},e){var r=i.doc.sel.primary(),o=i.getLine(r.head.line).indexOf(e,Math.max(0,r.head.ch-e.length));o>-1&&o<=r.head.ch&&(n.composing.sel=ft(Fo(r.head.line,o),Fo(r.head.line,o+e.length)))}})),La(r,"compositionupdate",(function(t){n.composing.data=t.data})),La(r,"compositionend",(function(t){var e=n.composing;e&&(t.data==e.startData||/\u200b/.test(t.data)||(e.data=t.data),setTimeout((function(){e.handled||n.applyComposition(e),n.composing==e&&(n.composing=null)}),50))})),La(r,"touchstart",(function(){n.forceCompositionEnd()})),La(r,"input",(function(){n.composing||!i.isReadOnly()&&n.pollContent()||Ae(n.cm,(function(){je(i)}))})),La(r,"copy",e),La(r,"cut",e)},prepareSelection:function(){var t=jt(this.cm,!1);return t.focus=this.cm.state.focused,t},showSelection:function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},showPrimarySelection:function(){var t=window.getSelection(),e=this.cm.doc.sel.primary(),n=st(this.cm,t.anchorNode,t.anchorOffset),i=st(this.cm,t.focusNode,t.focusOffset);if(!n||n.bad||!i||i.bad||0!=Bo(G(n,i),e.from())||0!=Bo($(n,i),e.to())){var r=ot(this.cm,e.from()),o=ot(this.cm,e.to());if(r||o){var a=this.cm.display.view,s=t.rangeCount&&t.getRangeAt(0);if(r){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else r={node:a[0].measure.map[2],offset:0};try{var c=Ua(r.node,r.offset,o.offset,o.node)}catch(t){}c&&(!go&&this.cm.state.focused?(t.collapse(r.node,r.offset),c.collapsed||t.addRange(c)):(t.removeAllRanges(),t.addRange(c)),s&&null==t.anchorNode?t.addRange(s):go&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation((function(){t.cm.curOp.selectionChanged=!0}))}),20)},showMultipleSelections:function(t){Ur(this.cm.display.cursorDiv,t.cursors),Ur(this.cm.display.selectionDiv,t.selection)},rememberSelection:function(){var t=window.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},selectionInEditor:function(){var t=window.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return $a(this.div,e)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}var e=this;this.selectionInEditor()?this.pollSelection():Ae(this.cm,(function(){e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,t)},selectionChanged:function(){var t=window.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var t=window.getSelection(),e=this.cm;this.rememberSelection();var n=st(e,t.anchorNode,t.anchorOffset),i=st(e,t.focusNode,t.focusOffset);n&&i&&Ae(e,(function(){Tt(e.doc,ft(n,i),Ra),(n.bad||i.bad)&&(e.curOp.selectionChanged=!0)}))}},pollContent:function(){var t,e=this.cm,n=e.display,i=e.doc.sel.primary(),r=i.from(),o=i.to();if(r.line<n.viewFrom||o.line>n.viewTo-1)return!1;if(r.line==n.viewFrom||0==(t=Fe(e,r.line)))var a=er(n.view[0].line),s=n.view[0].node;else a=er(n.view[t].line),s=n.view[t-1].node.nextSibling;var l=Fe(e,o.line);if(l==n.view.length-1)var u=n.viewTo-1,c=n.lineDiv.lastChild;else u=er(n.view[l+1].line)-1,c=n.view[l+1].node.previousSibling;for(var h=e.doc.splitLines(ut(e,s,c,a,u)),d=Ji(e.doc,Fo(a,0),Fo(u,Xi(e.doc,u).text.length));h.length>1&&d.length>1;)if(Pr(h)==Pr(d))h.pop(),d.pop(),u--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),a++}for(var f=0,p=0,m=h[0],g=d[0],v=Math.min(m.length,g.length);v>f&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var y=Pr(h),b=Pr(d),_=Math.min(y.length-(1==h.length?f:0),b.length-(1==d.length?f:0));_>p&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;h[h.length-1]=y.slice(0,y.length-p),h[0]=h[0].slice(f);var w=Fo(a,f),x=Fo(u,d.length?Pr(d).length-p:0);return h.length>1||h[0]||Bo(w,x)?(Pn(e.doc,h,w,x,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(t){this.cm.isReadOnly()?Le(this.cm,je)(this.cm):t.data&&t.data!=t.startData&&Le(this.cm,X)(this.cm,t.data,0,t.sel)},setUneditable:function(t){t.contentEditable="false"},onKeyPress:function(t){t.preventDefault(),this.cm.isReadOnly()||Le(this.cm,X)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0)},readOnlyChanged:function(t){this.div.contentEditable=String("nocursor"!=t)},onContextMenu:jr,resetPosition:jr,needsContentAttribute:!0},rt.prototype),t.inputStyles={textarea:nt,contenteditable:rt},ct.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var n=this.ranges[e],i=t.ranges[e];if(0!=Bo(n.anchor,i.anchor)||0!=Bo(n.head,i.head))return!1}return!0},deepCopy:function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new ht(Y(this.ranges[e].anchor),Y(this.ranges[e].head));return new ct(t,this.primIndex)},somethingSelected:function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},contains:function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(Bo(e,i.from())>=0&&Bo(t,i.to())<=0)return n}return-1}},ht.prototype={from:function(){return G(this.anchor,this.head)},to:function(){return $(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var qo,Ho,Wo,Uo={left:0,right:0,top:0,bottom:0},Vo=null,Zo=0,Yo=0,$o=0,Go=null;bo?Go=-.53:go?Go=15:ko?Go=-.7:Co&&(Go=-1/3);var Ko=function(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}};t.wheelEventPixels=function(t){var e=Ko(t);return e.x*=Go,e.y*=Go,e};var Xo=new Lr,Jo=null,Qo=t.changeEnd=function(t){return t.text?Fo(t.from.line+t.text.length-1,Pr(t.text).length+(1==t.text.length?t.from.ch:0)):t.to};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,e){var n=this.options,i=n[t];n[t]==e&&"mode"!=t||(n[t]=e,ea.hasOwnProperty(t)&&Le(this,ea[t])(this,e,i))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Yn(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:Me((function(e,n){var i=e.token?e:t.getMode(this.options,e);if(i.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:i,modeSpec:e,opaque:n&&n.opaque}),this.state.modeGen++,je(this)})),removeOverlay:Me((function(t){for(var e=this.state.overlays,n=0;n<e.length;++n){var i=e[n].modeSpec;if(i==t||"string"==typeof t&&i.name==t)return e.splice(n,1),this.state.modeGen++,void je(this)}})),indentLine:Me((function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),vt(this.doc,t)&&zn(this,t,e,n)})),indentSelection:Me((function(t){for(var e=this.doc.sel.ranges,n=-1,i=0;i<e.length;i++){var r=e[i];if(r.empty())r.head.line>n&&(zn(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&Fn(this));else{var o=r.from(),a=r.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)zn(this,l,t);var u=this.doc.sel.ranges;0==o.ch&&e.length==u.length&&u[i].from().ch>0&&xt(this.doc,i,new ht(o,u[i].to()),Ra)}}})),getTokenAt:function(t,e){return Pi(this,t,e)},getLineTokens:function(t,e){return Pi(this,Fo(t),e,!0)},getTokenTypeAt:function(t){t=mt(this.doc,t);var e,n=ji(this,Xi(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]<o)){e=n[2*a+2];break}i=a+1}}var s=e?e.indexOf("cm-overlay "):-1;return 0>s?e:0==s?null:e.slice(0,s-1)},getModeAt:function(e){var n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var n=[];if(!sa.hasOwnProperty(e))return n;var i=sa[e],r=this.getModeAt(t);if("string"==typeof r[e])i[r[e]]&&n.push(i[r[e]]);else if(r[e])for(var o=0;o<r[e].length;o++){var a=i[r[e][o]];a&&n.push(a)}else r.helperType&&i[r.helperType]?n.push(i[r.helperType]):i[r.name]&&n.push(i[r.name]);for(o=0;o<i._global.length;o++){var s=i._global[o];s.pred(r,this)&&-1==Nr(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(t,e){var n=this.doc;return Ht(this,(t=pt(n,null==t?n.first+n.size-1:t))+1,e)},cursorCoords:function(t,e){var n=this.doc.sel.primary();return fe(this,null==t?n.head:"object"==typeof t?mt(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return de(this,mt(this.doc,t),e||"page")},coordsChar:function(t,e){return ge(this,(t=he(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=he(this,{top:t,left:0},e||"page").top,nr(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e){var n,i=!1;if("number"==typeof t){var r=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>r&&(t=r,i=!0),n=Xi(this.doc,t)}else n=t;return ce(this,n,{top:0,left:0},e||"page").top+(i?this.doc.height-ir(n):0)},defaultTextHeight:function(){return ye(this.display)},defaultCharWidth:function(){return be(this.display)},setGutterMarker:Me((function(t,e,n){return qn(this.doc,t,"gutter",(function(t){var i=t.gutterMarkers||(t.gutterMarkers={});return i[e]=n,!n&&zr(i)&&(t.gutterMarkers=null),!0}))})),clearGutter:Me((function(t){var e=this,n=e.doc,i=n.first;n.iter((function(n){n.gutterMarkers&&n.gutterMarkers[t]&&(n.gutterMarkers[t]=null,Ie(e,i,"gutter"),zr(n.gutterMarkers)&&(n.gutterMarkers=null)),++i}))})),lineInfo:function(t){if("number"==typeof t){if(!vt(this.doc,t))return null;var e=t;if(!(t=Xi(this.doc,t)))return null}else if(null==(e=er(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display,a=(t=fe(this,mt(this.doc,t))).bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)a=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(a=t.bottom),s+e.offsetWidth>u&&(s=u-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==r?(s=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),n&&jn(this,s,a,s+e.offsetWidth,a+e.offsetHeight)},triggerOnKeyDown:Me(dn),triggerOnKeyPress:Me(mn),triggerOnKeyUp:pn,execCommand:function(t){return ca.hasOwnProperty(t)?ca[t].call(null,this):void 0},triggerElectric:Me((function(t){Q(this,t)})),findPosH:function(t,e,n,i){var r=1;0>e&&(r=-1,e=-e);for(var o=0,a=mt(this.doc,t);e>o&&!(a=Wn(this.doc,a,r,n,i)).hitSide;++o);return a},moveH:Me((function(t,e){var n=this;n.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?Wn(n.doc,i.head,t,e,n.options.rtlMoveVisually):0>t?i.from():i.to()}),Ba)})),deleteH:Me((function(t,e){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Hn(this,(function(n){var r=Wn(i,n.head,t,e,!1);return 0>t?{from:r,to:n.head}:{from:n.head,to:r}}))})),findPosV:function(t,e,n,i){var r=1,o=i;0>e&&(r=-1,e=-e);for(var a=0,s=mt(this.doc,t);e>a;++a){var l=fe(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Un(this,l,r,n)).hitSide)break}return s},moveV:Me((function(t,e){var n=this,i=this.doc,r=[],o=!n.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(a){if(o)return 0>t?a.from():a.to();var s=fe(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),r.push(s.left);var l=Un(n,s,t,e);return"page"==e&&a==i.sel.primary()&&Rn(n,null,de(n,l,"div").top-s.top),l}),Ba),r.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=r[a]})),findWordAt:function(t){var e=Xi(this.doc,t.line).text,n=t.ch,i=t.ch;if(e){var r=this.getHelper(t,"wordChars");(t.xRel<0||i==e.length)&&n?--n:++i;for(var o=e.charAt(n),a=Br(o,r)?function(t){return Br(t,r)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!Br(t)};n>0&&a(e.charAt(n-1));)--n;for(;i<e.length&&a(e.charAt(i));)++i}return new ht(Fo(t.line,n),Fo(t.line,i))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ja(this.display.cursorDiv,"CodeMirror-overwrite"):Xa(this.display.cursorDiv,"CodeMirror-overwrite"),Na(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Vr()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Me((function(t,e){null==t&&null==e||Bn(this),null!=t&&(this.curOp.scrollLeft=t),null!=e&&(this.curOp.scrollTop=e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Zt(this)-this.display.barHeight,width:t.scrollWidth-Zt(this)-this.display.barWidth,clientHeight:$t(this),clientWidth:Yt(this)}},scrollIntoView:Me((function(t,e){if(null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:Fo(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line)Bn(this),this.curOp.scrollToPos=t;else{var n=In(this,Math.min(t.from.left,t.to.left),Math.min(t.from.top,t.to.top)-t.margin,Math.max(t.from.right,t.to.right),Math.max(t.from.bottom,t.to.bottom)+t.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}})),setSize:Me((function(t,e){function n(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t}var i=this;null!=t&&(i.display.wrapper.style.width=n(t)),null!=e&&(i.display.wrapper.style.height=n(e)),i.options.lineWrapping&&ae(this);var r=i.display.viewFrom;i.doc.iter(r,i.display.viewTo,(function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){Ie(i,r,"widget");break}++r})),i.curOp.forceUpdate=!0,Na(i,"refresh",this)})),operation:function(t){return Ae(this,t)},refresh:Me((function(){var t=this.display.cachedTextHeight;je(this),this.curOp.forceUpdate=!0,se(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),c(this),(null==t||Math.abs(t-ye(this.display))>.5)&&a(this),Na(this,"refresh",this)})),swapDoc:Me((function(t){var e=this.doc;return e.cm=null,Ki(this,t),se(this),this.display.input.reset(),this.scrollTo(t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Sr(this,"swapDoc",this,e),e})),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ar(t);var ta=t.defaults={},ea=t.optionHandlers={},na=t.Init={toString:function(){return"CodeMirror.Init"}};Vn("value","",(function(t,e){t.setValue(e)}),!0),Vn("mode",null,(function(t,e){t.doc.modeOption=e,n(t)}),!0),Vn("indentUnit",2,n,!0),Vn("indentWithTabs",!1),Vn("smartIndent",!0),Vn("tabSize",4,(function(t){i(t),se(t),je(t)}),!0),Vn("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter((function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(Fo(i,o))}i++}));for(var r=n.length-1;r>=0;r--)Pn(t.doc,e,n[r],Fo(n[r].line,n[r].ch+e.length))}})),Vn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,(function(e,n,i){e.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),i!=t.Init&&e.refresh()})),Vn("specialCharPlaceholder",Bi,(function(t){t.refresh()}),!0),Vn("electricChars",!0),Vn("inputStyle",Ao?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),Vn("rtlMoveVisually",!Po),Vn("wholeLineUpdateBefore",!0),Vn("theme","default",(function(t){s(t),l(t)}),!0),Vn("keyMap","default",(function(e,n,i){var r=Yn(n),o=i!=t.Init&&Yn(i);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),Vn("extraKeys",null),Vn("lineWrapping",!1,r,!0),Vn("gutters",[],(function(t){f(t.options),l(t)}),!0),Vn("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?S(t.display)+"px":"0",t.refresh()}),!0),Vn("coverGutterNextToScrollbar",!1,(function(t){y(t)}),!0),Vn("scrollbarStyle","native",(function(t){v(t),y(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),Vn("lineNumbers",!1,(function(t){f(t.options),l(t)}),!0),Vn("firstLineNumber",1,l,!0),Vn("lineNumberFormatter",(function(t){return t}),l,!0),Vn("showCursorWhenSelecting",!1,Dt,!0),Vn("resetSelectionOnContextMenu",!0),Vn("lineWiseCopyCut",!0),Vn("readOnly",!1,(function(t,e){"nocursor"==e?(yn(t),t.display.input.blur(),t.display.disabled=!0):t.display.disabled=!1,t.display.input.readOnlyChanged(e)})),Vn("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),Vn("dragDrop",!0,We),Vn("allowDropFileTypes",null),Vn("cursorBlinkRate",530),Vn("cursorScrollMargin",0),Vn("cursorHeight",1,Dt,!0),Vn("singleCursorHeightPerLine",!0,Dt,!0),Vn("workTime",100),Vn("workDelay",100),Vn("flattenSpans",!0,i,!0),Vn("addModeClass",!1,i,!0),Vn("pollInterval",100),Vn("undoDepth",200,(function(t,e){t.doc.history.undoDepth=e})),Vn("historyEventDelay",1250),Vn("viewportMargin",10,(function(t){t.refresh()}),!0),Vn("maxHighlightLength",1e4,i,!0),Vn("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),Vn("tabindex",null,(function(t,e){t.display.input.getField().tabIndex=e||""})),Vn("autofocus",null);var ia=t.modes={},ra=t.mimeModes={};t.defineMode=function(e,n){t.defaults.mode||"null"==e||(t.defaults.mode=e),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),ia[e]=n},t.defineMIME=function(t,e){ra[t]=e},t.resolveMode=function(e){if("string"==typeof e&&ra.hasOwnProperty(e))e=ra[e];else if(e&&"string"==typeof e.name&&ra.hasOwnProperty(e.name)){var n=ra[e.name];"string"==typeof n&&(n={name:n}),(e=Ir(n,e)).name=n.name}else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return t.resolveMode("application/xml");return"string"==typeof e?{name:e}:e||{name:"null"}},t.getMode=function(e,n){n=t.resolveMode(n);var i=ia[n.name];if(!i)return t.getMode(e,"text/plain");var r=i(e,n);if(oa.hasOwnProperty(n.name)){var o=oa[n.name];for(var a in o)o.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=o[a])}if(r.name=n.name,n.helperType&&(r.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)r[a]=n.modeProps[a];return r},t.defineMode("null",(function(){return{token:function(t){t.skipToEnd()}}})),t.defineMIME("text/plain","null");var oa=t.modeExtensions={};t.extendMode=function(t,e){Rr(e,oa.hasOwnProperty(t)?oa[t]:oa[t]={})},t.defineExtension=function(e,n){t.prototype[e]=n},t.defineDocExtension=function(t,e){Sa.prototype[t]=e},t.defineOption=Vn;var aa=[];t.defineInitHook=function(t){aa.push(t)};var sa=t.helpers={};t.registerHelper=function(e,n,i){sa.hasOwnProperty(e)||(sa[e]=t[e]={_global:[]}),sa[e][n]=i},t.registerGlobalHelper=function(e,n,i,r){t.registerHelper(e,n,r),sa[e]._global.push({pred:i,val:r})};var la=t.copyState=function(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n},ua=t.startState=function(t,e,n){return!t.startState||t.startState(e,n)};t.innerMode=function(t,e){for(;t.innerMode;){var n=t.innerMode(e);if(!n||n.mode==t)break;e=n.state,t=n.mode}return n||{mode:t,state:e}};var ca=t.commands={selectAll:function(t){t.setSelection(Fo(t.firstLine(),0),Fo(t.lastLine()),Ra)},singleSelection:function(t){t.setSelection(t.getCursor("anchor"),t.getCursor("head"),Ra)},killLine:function(t){Hn(t,(function(e){if(e.empty()){var n=Xi(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:Fo(e.head.line+1,0)}:{from:e.head,to:Fo(e.head.line,n)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){Hn(t,(function(e){return{from:Fo(e.from().line,0),to:mt(t.doc,Fo(e.to().line+1,0))}}))},delLineLeft:function(t){Hn(t,(function(t){return{from:Fo(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){Hn(t,(function(e){var n=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:n},"div"),to:e.from()}}))},delWrappedLineRight:function(t){Hn(t,(function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:i}}))},undo:function(t){t.undo()},redo:function(t){t.redo()},undoSelection:function(t){t.undoSelection()},redoSelection:function(t){t.redoSelection()},goDocStart:function(t){t.extendSelection(Fo(t.firstLine(),0))},goDocEnd:function(t){t.extendSelection(Fo(t.lastLine()))},goLineStart:function(t){t.extendSelectionsBy((function(e){return oo(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){t.extendSelectionsBy((function(e){return so(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){t.extendSelectionsBy((function(e){return ao(t,e.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(t){t.extendSelectionsBy((function(e){var n=t.charCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")}),Ba)},goLineLeft:function(t){t.extendSelectionsBy((function(e){var n=t.charCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")}),Ba)},goLineLeftSmart:function(t){t.extendSelectionsBy((function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:0,top:n},"div");return i.ch<t.getLine(i.line).search(/\S/)?so(t,e.head):i}),Ba)},goLineUp:function(t){t.moveV(-1,"line")},goLineDown:function(t){t.moveV(1,"line")},goPageUp:function(t){t.moveV(-1,"page")},goPageDown:function(t){t.moveV(1,"page")},goCharLeft:function(t){t.moveH(-1,"char")},goCharRight:function(t){t.moveH(1,"char")},goColumnLeft:function(t){t.moveH(-1,"column")},goColumnRight:function(t){t.moveH(1,"column")},goWordLeft:function(t){t.moveH(-1,"word")},goGroupRight:function(t){t.moveH(1,"group")},goGroupLeft:function(t){t.moveH(-1,"group")},goWordRight:function(t){t.moveH(1,"word")},delCharBefore:function(t){t.deleteH(-1,"char")},delCharAfter:function(t){t.deleteH(1,"char")},delWordBefore:function(t){t.deleteH(-1,"word")},delWordAfter:function(t){t.deleteH(1,"word")},delGroupBefore:function(t){t.deleteH(-1,"group")},delGroupAfter:function(t){t.deleteH(1,"group")},indentAuto:function(t){t.indentSelection("smart")},indentMore:function(t){t.indentSelection("add")},indentLess:function(t){t.indentSelection("subtract")},insertTab:function(t){t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),i=t.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),a=za(t.getLine(o.line),o.ch,i);e.push(Mr(i-a%i))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){Ae(t,(function(){for(var e=t.listSelections(),n=[],i=0;i<e.length;i++){var r=e[i].head,o=Xi(t.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new Fo(r.line,r.ch-1)),r.ch>0)r=new Fo(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),Fo(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var a=Xi(t.doc,r.line-1).text;a&&t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),Fo(r.line-1,a.length-1),Fo(r.line,1),"+transpose")}n.push(new ht(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){Ae(t,(function(){for(var e=t.listSelections().length,n=0;e>n;n++){var i=t.listSelections()[n];t.replaceRange(t.doc.lineSeparator(),i.anchor,i.head,"+input"),t.indentLine(i.from().line+1,null,!0)}Fn(t)}))},openLine:function(t){t.replaceSelection("\n","start")},toggleOverwrite:function(t){t.toggleOverwrite()}},ha=t.keyMap={};ha.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ha.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ha.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ha.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ha.default=Lo?ha.macDefault:ha.pcDefault,t.normalizeKeyMap=function(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete t[n];continue}for(var r=Dr(n.split(" "),Zn),o=0;o<r.length;o++){var a,s;o==r.length-1?(s=r.join(" "),a=i):(s=r.slice(0,o+1).join(" "),a="...");var l=e[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else e[s]=a}delete t[n]}for(var u in e)t[u]=e[u];return t};var da=t.lookupKey=function(t,e,n,i){var r=(e=Yn(e)).call?e.call(t,i):e[t];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return da(t,e.fallthrough,n,i);for(var o=0;o<e.fallthrough.length;o++){var a=da(t,e.fallthrough[o],n,i);if(a)return a}}},fa=t.isModifierKey=function(t){var e="string"==typeof t?t:os[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e},pa=t.keyName=function(t,e){if(So&&34==t.keyCode&&t.char)return!1;var n=os[t.keyCode],i=n;return null!=i&&!t.altGraphKey&&(t.altKey&&"Alt"!=n&&(i="Alt-"+i),(Do?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(i="Ctrl-"+i),(Do?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(i="Cmd-"+i),!e&&t.shiftKey&&"Shift"!=n&&(i="Shift-"+i),i)};t.fromTextArea=function(e,n){function i(){e.value=l.getValue()}if((n=n?Rr(n):{}).value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),null==n.autofocus){var r=Vr();n.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}if(e.form&&(La(e.form,"submit",i),!n.leaveSubmitMethodAlone)){var o=e.form,a=o.submit;try{var s=o.submit=function(){i(),o.submit=a,o.submit(),o.submit=s}}catch(t){}}n.finishInit=function(t){t.save=i,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,i(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Pa(e.form,"submit",i),"function"==typeof e.form.submit&&(e.form.submit=a))}},e.style.display="none";var l=t((function(t){e.parentNode.insertBefore(t,e.nextSibling)}),n);return l};var ma=t.StringStream=function(t,e){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ma.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(t){var e=this.string.charAt(this.pos);if("string"==typeof t)var n=e==t;else n=e&&(t.test?t.test(e):t(e));return n?(++this.pos,e):void 0},eatWhile:function(t){for(var e=this.pos;this.eat(t););return this.pos>e},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);return e>-1?(this.pos=e,!0):void 0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=za(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?za(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return za(this.string,null,this.tabSize)-(this.lineStart?za(this.string,this.lineStart,this.tabSize):0)},match:function(t,e,n){if("string"!=typeof t){var i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t};return r(this.string.substr(this.pos,t.length))==r(t)?(!1!==e&&(this.pos+=t.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}}};var ga=0,va=t.TextMarker=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++ga};Ar(va),va.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&_e(t),Er(this,"clear")){var n=this.find();n&&Sr(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=ti(a.markedSpans,this);t&&!this.collapsed?Ie(t,er(a),"text"):t&&(null!=s.to&&(r=er(a)),null!=s.from&&(i=er(a))),a.markedSpans=ei(a.markedSpans,s),null==s.from&&this.collapsed&&!xi(this.doc,a)&&t&&tr(a,ye(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(o=0;o<this.lines.length;++o){var l=yi(this.lines[o]),u=h(l);u>t.display.maxLineLength&&(t.display.maxLine=l,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&je(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&At(t.doc)),t&&Sr(t,"markerCleared",t,this),e&&xe(t),this.parent&&this.parent.clear()}},va.prototype.find=function(t,e){null==t&&"bookmark"==this.type&&(t=1);for(var n,i,r=0;r<this.lines.length;++r){var o=this.lines[r],a=ti(o.markedSpans,this);if(null!=a.from&&(n=Fo(e?o:er(o),a.from),-1==t))return n;if(null!=a.to&&(i=Fo(e?o:er(o),a.to),1==t))return i}return n&&{from:n,to:i}},va.prototype.changed=function(){var t=this.find(-1,!0),e=this,n=this.doc.cm;t&&n&&Ae(n,(function(){var i=t.line,r=er(t.line),o=Qt(n,r);if(o&&(oe(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!xi(e.doc,i)&&null!=e.height){var a=e.height;e.height=null;var s=Ci(e)-a;s&&tr(i,i.height+s)}}))},va.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=Nr(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},va.prototype.detachLine=function(t){if(this.lines.splice(Nr(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},ga=0;var ya=t.SharedTextMarker=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};Ar(ya),ya.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();Sr(this,"clear")}},ya.prototype.find=function(t,e){return this.primary.find(t,e)};var ba=t.LineWidget=function(t,e,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=t,this.node=e};Ar(ba),ba.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,i=er(n);if(null!=i&&e){for(var r=0;r<e.length;++r)e[r]==this&&e.splice(r--,1);e.length||(n.widgets=null);var o=Ci(this);tr(n,Math.max(0,n.height-o)),t&&Ae(t,(function(){Si(t,n,-o),Ie(t,i,"widget")}))}},ba.prototype.changed=function(){var t=this.height,e=this.doc.cm,n=this.line;this.height=null;var i=Ci(this)-t;i&&(tr(n,n.height+i),e&&Ae(e,(function(){e.curOp.forceUpdate=!0,Si(e,n,i)})))};var _a=t.Line=function(t,e,n){this.text=t,ci(this,e),this.height=n?n(this):1};Ar(_a),_a.prototype.lineNo=function(){return er(this)};var wa={},xa={};Yi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=t,i=t+e;i>n;++n){var r=this.lines[n];this.height-=r.height,Ei(r),Sr(r,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var i=0;i<e.length;++i)e[i].parent=this},iterN:function(t,e,n){for(var i=t+e;i>t;++t)if(n(this.lines[t]))return!0}},$i.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;n<this.children.length;++n){var i=this.children[n],r=i.chunkSize();if(r>t){var o=Math.min(e,r-t),a=i.height;if(i.removeInner(t,o),this.height-=a-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(e-=o))break;t=0}else t-=r}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof Yi))){var s=[];this.collapse(s),this.children=[new Yi(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,n){this.size+=e.length,this.height+=n;for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(o>=t){if(r.insertInner(t,e,n),r.lines&&r.lines.length>50){for(var a=r.lines.length%25+25,s=a;s<r.lines.length;){var l=new Yi(r.lines.slice(s,s+=25));r.height-=l.height,this.children.splice(++i,0,l),l.parent=this}r.lines=r.lines.slice(0,a),this.maybeSpill()}break}t-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new $i(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var n=Nr(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var i=new $i(t.children);i.parent=t,t.children=[i,e],t=i}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(o>t){var a=Math.min(e,o-t);if(r.iterN(t,a,n))return!0;if(0==(e-=a))break;t=0}else t-=o}}};var ka=0,Sa=t.Doc=function(t,e,n,i){if(!(this instanceof Sa))return new Sa(t,e,n,i);null==n&&(n=0),$i.call(this,[new Yi([new _a("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=Fo(n,0);this.sel=ft(r),this.history=new or(null),this.id=++ka,this.modeOption=e,this.lineSep=i,this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Zi(this,{from:r,to:r,text:t}),Tt(this,ft(r),Ra)};Sa.prototype=Ir($i.prototype,{constructor:Sa,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,i=0;i<e.length;++i)n+=e[i].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=Qi(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:Pe((function(t){var e=Fo(this.first,0),n=this.first+this.size-1;Tn(this,{from:e,to:Fo(n,Xi(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),Tt(this,ft(e))})),replaceRange:function(t,e,n,i){Pn(this,t,e=mt(this,e),n=n?mt(this,n):e,i)},getRange:function(t,e,n){var i=Ji(this,mt(this,t),mt(this,e));return!1===n?i:i.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){return vt(this,t)?Xi(this,t):void 0},getLineNumber:function(t){return er(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Xi(this,t)),yi(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return mt(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Pe((function(t,e,n){kt(this,mt(this,"number"==typeof t?Fo(t,e||0):t),null,n)})),setSelection:Pe((function(t,e,n){kt(this,mt(this,t),mt(this,e||t),n)})),extendSelection:Pe((function(t,e,n){_t(this,mt(this,t),e&&mt(this,e),n)})),extendSelections:Pe((function(t,e){wt(this,yt(this,t),e)})),extendSelectionsBy:Pe((function(t,e){wt(this,yt(this,Dr(this.sel.ranges,t)),e)})),setSelections:Pe((function(t,e,n){if(t.length){for(var i=0,r=[];i<t.length;i++)r[i]=new ht(mt(this,t[i].anchor),mt(this,t[i].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Tt(this,dt(r,e),n)}})),addSelection:Pe((function(t,e,n){var i=this.sel.ranges.slice(0);i.push(new ht(mt(this,t),mt(this,e||t))),Tt(this,dt(i,i.length-1),n)})),getSelection:function(t){for(var e,n=this.sel.ranges,i=0;i<n.length;i++){var r=Ji(this,n[i].from(),n[i].to());e=e?e.concat(r):r}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],n=this.sel.ranges,i=0;i<n.length;i++){var r=Ji(this,n[i].from(),n[i].to());!1!==t&&(r=r.join(t||this.lineSeparator())),e[i]=r}return e},replaceSelection:function(t,e,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=t;this.replaceSelections(i,e,n||"+input")},replaceSelections:Pe((function(t,e,n){for(var i=[],r=this.sel,o=0;o<r.ranges.length;o++){var a=r.ranges[o];i[o]={from:a.from(),to:a.to(),text:this.splitLines(t[o]),origin:n}}var s=e&&"end"!=e&&Sn(this,i,e);for(o=i.length-1;o>=0;o--)Tn(this,i[o]);s?Ct(this,s):this.cm&&Fn(this.cm)})),undo:Pe((function(){En(this,"undo")})),redo:Pe((function(){En(this,"redo")})),undoSelection:Pe((function(){En(this,"undo",!0)})),redoSelection:Pe((function(){En(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i<t.done.length;i++)t.done[i].ranges||++e;for(i=0;i<t.undone.length;i++)t.undone[i].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){this.history=new or(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:gr(this.history.done),undone:gr(this.history.undone)}},setHistory:function(t){var e=this.history=new or(this.history.maxGeneration);e.done=gr(t.done.slice(0),null,!0),e.undone=gr(t.undone.slice(0),null,!0)},addLineClass:Pe((function(t,e,n){return qn(this,t,"gutter"==e?"gutter":"class",(function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[i]){if(Zr(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0}))})),removeLineClass:Pe((function(t,e,n){return qn(this,t,"gutter"==e?"gutter":"class",(function(t){var i="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",r=t[i];if(!r)return!1;if(null==n)t[i]=null;else{var o=r.match(Zr(n));if(!o)return!1;var a=o.index+o[0].length;t[i]=r.slice(0,o.index)+(o.index&&a!=r.length?" ":"")+r.slice(a)||null}return!0}))})),addLineWidget:Pe((function(t,e,n){return Ti(this,t,e,n)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return $n(this,mt(this,t),mt(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return $n(this,t=mt(this,t),t,n,"bookmark")},findMarksAt:function(t){var e=[],n=Xi(this,(t=mt(this,t)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=t.ch)&&(null==r.to||r.to>=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=mt(this,t),e=mt(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&r==t.line&&t.ch>=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r})),i},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&t.push(n[i].marker)})),t},posFromIndex:function(t){var e,n=this.first,i=this.lineSeparator().length;return this.iter((function(r){var o=r.text.length+i;return o>t?(e=t,!0):(t-=o,void++n)})),mt(this,Fo(n,e))},indexFromPos:function(t){var e=(t=mt(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,(function(t){e+=t.text.length+n})),e},copy:function(t){var e=new Sa(Qi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var i=new Sa(Qi(this,e,n),t.mode||this.modeOption,e,this.lineSep);return t.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:t.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],Xn(i,Kn(this)),i},unlinkDoc:function(e){if(e instanceof t&&(e=e.doc),this.linked)for(var n=0;n<this.linked.length;++n)if(this.linked[n].doc==e){this.linked.splice(n,1),e.unlinkDoc(this),Jn(Kn(this));break}if(e.history==this.history){var i=[e.id];Gi(e,(function(t){i.push(t.id)}),!0),e.history=new or(null),e.history.done=gr(this.history.done,i),e.history.undone=gr(this.history.undone,i)}},iterLinkedDocs:function(t){Gi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):es(t)},lineSeparator:function(){return this.lineSep||"\n"}}),Sa.prototype.eachLine=Sa.prototype.iter;var Ca="iter insert remove copy getEditor constructor".split(" ");for(var Ta in Sa.prototype)Sa.prototype.hasOwnProperty(Ta)&&Nr(Ca,Ta)<0&&(t.prototype[Ta]=function(t){return function(){return t.apply(this.doc,arguments)}}(Sa.prototype[Ta]));Ar(Sa);var Oa=t.e_preventDefault=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},Ea=t.e_stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},Aa=t.e_stop=function(t){Oa(t),Ea(t)},La=t.on=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var i=t._handlers||(t._handlers={});(i[e]||(i[e]=[])).push(n)}},Ma=[],Pa=t.off=function(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else for(var i=kr(t,e,!1),r=0;r<i.length;++r)if(i[r]==n){i.splice(r,1);break}},Na=t.signal=function(t,e){var n=kr(t,e,!0);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)},Da=null,ja=30,Ia=t.Pass={toString:function(){return"CodeMirror.Pass"}},Ra={scroll:!1},Fa={origin:"*mouse"},Ba={origin:"+move"};Lr.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var za=t.countColumn=function(t,e,n,i,r){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=i||0,a=r||0;;){var s=t.indexOf("\t",o);if(0>s||s>=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}},qa=t.findColumn=function(t,e,n){for(var i=0,r=0;;){var o=t.indexOf("\t",i);-1==o&&(o=t.length);var a=o-i;if(o==t.length||r+a>=e)return i+Math.min(a,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}},Ha=[""],Wa=function(t){t.select()};Eo?Wa=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:bo&&(Wa=function(t){try{t.select()}catch(t){}});var Ua,Va=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Za=t.isWordChar=function(t){return/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||Va.test(t))},Ya=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Ua=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var $a=t.contains=function(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)};bo&&11>_o&&(Vr=function(){try{return document.activeElement}catch(t){return document.body}});var Ga,Ka,Xa=t.rmClass=function(t,e){var n=t.className,i=Zr(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}},Ja=t.addClass=function(t,e){var n=t.className;Zr(e).test(n)||(t.className+=(n?" ":"")+e)},Qa=!1,ts=function(){if(bo&&9>_o)return!1;var t=Hr("div");return"draggable"in t||"dragDrop"in t}(),es=t.splitLines=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;i>=e;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},ns=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){try{var e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},is=function(){var t=Hr("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),rs=null,os=t.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var t=0;10>t;t++)os[t+48]=os[t+96]=String(t);for(t=65;90>=t;t++)os[t]=String.fromCharCode(t);for(t=1;12>=t;t++)os[t+111]=os[t+63235]="F"+t}();var as,ss=function(){function t(t){return 247>=t?n.charAt(t):t>=1424&&1524>=t?"R":t>=1536&&1773>=t?i.charAt(t-1536):t>=1774&&2220>=t?"r":t>=8192&&8203>=t?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!r.test(n))return!1;for(var i=n.length,c=[],h=0;i>h;++h)c.push(v=t(n.charCodeAt(h)));h=0;for(var d=u;i>h;++h)"m"==(v=c[h])?c[h]=d:d=v;h=0;for(var f=u;i>h;++h)"1"==(v=c[h])&&"r"==f?c[h]="n":a.test(v)&&(f=v,"r"==v&&(c[h]="R"));for(h=1,d=c[0];i-1>h;++h)"+"==(v=c[h])&&"1"==d&&"1"==c[h+1]?c[h]="1":","!=v||d!=c[h+1]||"1"!=d&&"n"!=d||(c[h]=d),d=v;for(h=0;i>h;++h)if(","==(v=c[h]))c[h]="N";else if("%"==v){for(var p=h+1;i>p&&"%"==c[p];++p);for(var m=h&&"!"==c[h-1]||i>p&&"1"==c[p]?"1":"N",g=h;p>g;++g)c[g]=m;h=p-1}for(h=0,f=u;i>h;++h){var v=c[h];"L"==f&&"1"==v?c[h]="L":a.test(v)&&(f=v)}for(h=0;i>h;++h)if(o.test(c[h])){for(p=h+1;i>p&&o.test(c[p]);++p);var y="L"==(h?c[h-1]:u),b="L"==(i>p?c[p]:u);for(m=y||b?"L":"R",g=h;p>g;++g)c[g]=m;h=p-1}var _,w=[];for(h=0;i>h;)if(s.test(c[h])){var x=h;for(++h;i>h&&s.test(c[h]);++h);w.push(new e(0,x,h))}else{var k=h,S=w.length;for(++h;i>h&&"L"!=c[h];++h);for(g=k;h>g;)if(l.test(c[g])){g>k&&w.splice(S,0,new e(1,k,g));var C=g;for(++g;h>g&&l.test(c[g]);++g);w.splice(S,0,new e(2,C,g)),k=g}else++g;h>k&&w.splice(S,0,new e(1,k,h))}return 1==w[0].level&&(_=n.match(/^\s+/))&&(w[0].from=_[0].length,w.unshift(new e(0,0,_[0].length))),1==Pr(w).level&&(_=n.match(/\s+$/))&&(Pr(w).to-=_[0].length,w.push(new e(0,i-_[0].length,i))),2==w[0].level&&w.unshift(new e(1,w[0].to,w[0].to)),w[0].level!=Pr(w).level&&w.push(new e(w[0].level,i,i)),w}}();return t.version="5.15.2",t}))},{}],11:[function(t,e,n){var r;r=function(t){"use strict";var e=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;t.defineMode("gfm",(function(n,i){function r(t){return t.code=!1,null}var o=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(t){return{code:t.code,codeBlock:t.codeBlock,ateSpace:t.ateSpace}},token:function(t,n){if(n.combineTokens=null,n.codeBlock)return t.match(/^```+/)?(n.codeBlock=!1,null):(t.skipToEnd(),null);if(t.sol()&&(n.code=!1),t.sol()&&t.match(/^```+/))return t.skipToEnd(),n.codeBlock=!0,null;if("`"===t.peek()){t.next();var r=t.pos;t.eatWhile("`");var a=1+t.pos-r;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return t.next(),null;if(t.eatSpace())return n.ateSpace=!0,null;if((t.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==i.gitHubSpice)){if(t.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(t.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return t.match(e)&&"]("!=t.string.slice(t.start-2,t.start)&&(0==t.start||/\W/.test(t.string.charAt(t.start-1)))?(n.combineTokens=!0,"link"):(t.next(),null)},blankLine:r},s={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var l in i)s[l]=i[l];return s.name="markdown",t.overlayMode(t.getMode(n,s),a)}),"markdown"),t.defineMIME("text/x-gfm","gfm")},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror"),t("../markdown/markdown"),t("../../addon/mode/overlay")):"function"==typeof i&&i.amd?i(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],r):r(CodeMirror)},{"../../addon/mode/overlay":8,"../../lib/codemirror":10,"../markdown/markdown":12}],12:[function(t,e,n){var r;r=function(t){"use strict";t.defineMode("markdown",(function(e,n){function i(n){if(t.findModeByName){var i=t.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=t.getMode(e,n);return"null"==r.name?null:r}function r(t,e,n){return e.f=e.inline=n,n(t,e)}function o(t,e,n){return e.f=e.block=n,n(t,e)}function a(t){return!t||!/\S/.test(t.string)}function s(t){return t.linkTitle=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,x&&t.f==u&&(t.f=p,t.block=l),t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine=null,null}function l(e,o){var s=e.sol(),l=!1!==o.list,u=o.indentedCode;o.indentedCode=!1,l&&(o.indentationDiff>=0?(o.indentationDiff<4&&(o.indentation-=o.indentationDiff),o.list=null):o.indentation>0?o.list=null:o.list=!1);var h=null;if(o.indentationDiff>=4)return e.skipToEnd(),u||a(o.prevLine)?(o.indentation-=4,o.indentedCode=!0,k.code):null;if(e.eatSpace())return null;if((h=e.match(A))&&h[1].length<=6)return o.header=h[1].length,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,d(o);if(!(a(o.prevLine)||o.quote||l||u)&&(h=e.match(L)))return o.header="="==h[0].charAt(0)?1:2,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,d(o);if(e.eat(">"))return o.quote=s?1:o.quote+1,n.highlightFormatting&&(o.formatting="quote"),e.eatSpace(),d(o);if("["===e.peek())return r(e,o,y);if(e.match(C,!0))return o.hr=!0,k.hr;if((a(o.prevLine)||l)&&(e.match(T,!1)||e.match(O,!1))){var f=null;for(e.match(T,!0)?f="ul":(e.match(O,!0),f="ol"),o.indentation=e.column()+e.current().length,o.list=!0;o.listStack&&e.column()<o.listStack[o.listStack.length-1];)o.listStack.pop();return o.listStack.push(o.indentation),n.taskLists&&e.match(E,!1)&&(o.taskList=!0),o.f=o.inline,n.highlightFormatting&&(o.formatting=["list","list-"+f]),d(o)}return n.fencedCodeBlocks&&(h=e.match(P,!0))?(o.fencedChars=h[1],o.localMode=i(h[2]),o.localMode&&(o.localState=t.startState(o.localMode)),o.f=o.block=c,n.highlightFormatting&&(o.formatting="code-block"),o.code=-1,d(o)):r(e,o,o.inline)}function u(e,n){var i=w.token(e,n.htmlState);if(!x){var r=t.innerMode(w,n.htmlState);("xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText||n.md_inside&&e.current().indexOf(">")>-1)&&(n.f=p,n.block=l,n.htmlState=null)}return i}function c(t,e){return e.fencedChars&&t.match(e.fencedChars,!1)?(e.localMode=e.localState=null,e.f=e.block=h,null):e.localMode?e.localMode.token(t,e.localState):(t.skipToEnd(),k.code)}function h(t,e){t.match(e.fencedChars),e.block=l,e.f=p,e.fencedChars=null,n.highlightFormatting&&(e.formatting="code-block"),e.code=1;var i=d(e);return e.code=0,i}function d(t){var e=[];if(t.formatting){e.push(k.formatting),"string"==typeof t.formatting&&(t.formatting=[t.formatting]);for(var i=0;i<t.formatting.length;i++)e.push(k.formatting+"-"+t.formatting[i]),"header"===t.formatting[i]&&e.push(k.formatting+"-"+t.formatting[i]+"-"+t.header),"quote"===t.formatting[i]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(k.formatting+"-"+t.formatting[i]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(k.linkHref,"url"):(t.strong&&e.push(k.strong),t.em&&e.push(k.em),t.strikethrough&&e.push(k.strikethrough),t.linkText&&e.push(k.linkText),t.code&&e.push(k.code)),t.header&&e.push(k.header,k.header+"-"+t.header),t.quote&&(e.push(k.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(k.quote+"-"+t.quote):e.push(k.quote+"-"+n.maxBlockquoteDepth)),!1!==t.list){var r=(t.listStack.length-1)%3;r?1===r?e.push(k.list2):e.push(k.list3):e.push(k.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function f(t,e){return t.match(M,!0)?d(e):void 0}function p(e,i){var r=i.text(e,i);if(void 0!==r)return r;if(i.list)return i.list=null,d(i);if(i.taskList)return"x"!==e.match(E,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,d(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&e.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),d(i);var a=e.sol(),s=e.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var c="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(c),!0))return k.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),e.eatWhile("`");var f=e.current().length;if(0==i.code)return i.code=f,d(i);if(f==i.code){var p=d(i);return i.code=0,p}return i.formatting=h,d(i)}if(i.code)return d(i);if("\\"===s&&(e.next(),n.highlightFormatting)){var v=d(i),y=k.formatting+"-escape";return v?v+" "+y:y}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return e.match(/\[[^\]]*\]/),i.inline=i.f=g,k.image;if("["===s&&e.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1))return i.linkText=!0,n.highlightFormatting&&(i.formatting="link"),d(i);if("]"===s&&i.linkText&&e.match(/\(.*?\)| ?\[.*?\]/,!1)){n.highlightFormatting&&(i.formatting="link");var v=d(i);return i.linkText=!1,i.inline=i.f=g,v}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=m,n.highlightFormatting&&(i.formatting="link"),(v=d(i))?v+=" ":v="",v+k.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=m,n.highlightFormatting&&(i.formatting="link"),(v=d(i))?v+=" ":v="",v+k.linkEmail;if("<"===s&&e.match(/^(!--|\w)/,!1)){var b=e.string.indexOf(">",e.pos);if(-1!=b){var _=e.string.substring(e.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(_)&&(i.md_inside=!0)}return e.backUp(1),i.htmlState=t.startState(w),o(e,i,u)}if("<"===s&&e.match(/^\/\w*?>/))return i.md_inside=!1,"tag";var x=!1;if(!n.underscoresBreakWords&&"_"===s&&"_"!==e.peek()&&e.match(/(\w)/,!1)){var S=e.pos-2;if(S>=0){var C=e.string.charAt(S);"_"!==C&&C.match(/(\w)/,!1)&&(x=!0)}}if("*"===s||"_"===s&&!x)if(a&&" "===e.peek());else{if(i.strong===s&&e.eat(s))return n.highlightFormatting&&(i.formatting="strong"),p=d(i),i.strong=!1,p;if(!i.strong&&e.eat(s))return i.strong=s,n.highlightFormatting&&(i.formatting="strong"),d(i);if(i.em===s)return n.highlightFormatting&&(i.formatting="em"),p=d(i),i.em=!1,p;if(!i.em)return i.em=s,n.highlightFormatting&&(i.formatting="em"),d(i)}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return d(i);e.backUp(1)}if(n.strikethrough)if("~"===s&&e.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),p=d(i),i.strikethrough=!1,p;if(e.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),d(i)}else if(" "===s&&e.match(/^~~/,!0)){if(" "===e.peek())return d(i);e.backUp(2)}return" "===s&&(e.match(/ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),d(i)}function m(t,e){if(">"===t.next()){e.f=e.inline=p,n.highlightFormatting&&(e.formatting="link");var i=d(e);return i?i+=" ":i="",i+k.linkInline}return t.match(/^[^>]+/,!0),k.linkInline}function g(t,e){if(t.eatSpace())return null;var i=t.next();return"("===i||"["===i?(e.f=e.inline=v("("===i?")":"]",0),n.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,d(e)):"error"}function v(t){return function(e,i){if(e.next()===t){i.f=i.inline=p,n.highlightFormatting&&(i.formatting="link-string");var r=d(i);return i.linkHref=!1,r}return e.match(N[t]),i.linkHref=!0,d(i)}}function y(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=b,t.next(),n.highlightFormatting&&(e.formatting="link"),e.linkText=!0,d(e)):r(t,e,p)}function b(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=_,n.highlightFormatting&&(e.formatting="link");var i=d(e);return e.linkText=!1,i}return t.match(/^([^\]\\]|\\.)+/,!0),k.linkText}function _(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=p,k.linkHref+" url")}var w=t.getMode(e,"text/html"),x="null"==w.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var k={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var S in k)k.hasOwnProperty(S)&&n.tokenTypeOverrides[S]&&(k[S]=n.tokenTypeOverrides[S]);var C=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^[*\-+]\s+/,O=/^[0-9]+([.)])\s+/,E=/^\[(x| )\](?=\s)/,A=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,L=/^ *(?:\={1,}|-{1,})\s*$/,M=/^[^#!\[\]*_\\<>` "'(~]+/,P=new RegExp("^("+(!0===n.fencedCodeBlocks?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},D={startState:function(){return{f:l,prevLine:null,thisLine:null,block:l,htmlState:null,indentation:0,inline:p,text:f,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(w,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkTitle:e.linkTitle,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,header:e.header,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedChars:e.fencedChars}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine){var n=e.header||e.hr;if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0)||n){if(s(e),!n)return null;e.prevLine=null}e.prevLine=e.thisLine,e.thisLine=t,e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.f=e.block;var i=t.match(/^\s*/,!0)[0].replace(/\t/g,"    ").length;if(e.indentationDiff=Math.min(i-e.indentation,4),e.indentation=e.indentation+e.indentationDiff,i>0)return null}return e.f(t,e)},innerMode:function(t){return t.block==u?{state:t.htmlState,mode:w}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:D}},blankLine:s,getType:d,fold:"markdown"};return D}),"xml"),t.defineMIME("text/x-markdown","markdown")},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror"),t("../xml/xml"),t("../meta")):"function"==typeof i&&i.amd?i(["../../lib/codemirror","../xml/xml","../meta"],r):r(CodeMirror)},{"../../lib/codemirror":10,"../meta":13,"../xml/xml":14}],13:[function(t,e,n){var r;r=function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var e=0;e<t.modeInfo.length;e++){var n=t.modeInfo[e];n.mimes&&(n.mime=n.mimes[0])}t.findModeByMIME=function(e){e=e.toLowerCase();for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];if(i.mime==e)return i;if(i.mimes)for(var r=0;r<i.mimes.length;r++)if(i.mimes[r]==e)return i}},t.findModeByExtension=function(e){for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];if(i.ext)for(var r=0;r<i.ext.length;r++)if(i.ext[r]==e)return i}},t.findModeByFileName=function(e){for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];if(i.file&&i.file.test(e))return i}var r=e.lastIndexOf("."),o=r>-1&&e.substring(r+1,e.length);return o?t.findModeByExtension(o):void 0},t.findModeByName=function(e){e=e.toLowerCase();for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];if(i.name.toLowerCase()==e)return i;if(i.alias)for(var r=0;r<i.alias.length;r++)if(i.alias[r].toLowerCase()==e)return i}}},"object"==typeof n&&"object"==typeof e?r(t("../lib/codemirror")):"function"==typeof i&&i.amd?i(["../lib/codemirror"],r):r(CodeMirror)},{"../lib/codemirror":10}],14:[function(t,e,n){var r;r=function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};t.defineMode("xml",(function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(u(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(x=t.eat("/")?"closeTag":"openTag",e.tokenize=a,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function a(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,x=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return x="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=s(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=a;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function u(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=u(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=u(t-1),n.tokenize(e,n)}}return"meta"}}function c(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(C.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!C.contextGrabbers.hasOwnProperty(n)||!C.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?m:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),k="tag",y):(k="error",p)}function m(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&C.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===C.matchClosing?(k="tag",g):(k="tag error",v)}return k="error",v}function g(t,e,n){return"endTag"!=t?(k="error",g):(h(n),f)}function v(t,e,n){return k="error",g(t,e,n)}function y(t,e,n){if("word"==t)return k="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||C.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new c(n,i,r==n.indented)),f}return k="error",y}function b(t,e,n){return"equals"==t?_:(C.allowMissing||(k="error"),y(t,e,n))}function _(t,e,n){return"string"==t?w:"word"==t&&C.allowUnquoted?(k="string",y):(k="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var x,k,S=i.indentUnit,C={},T=r.htmlMode?e:n;for(var O in T)C[O]=T[O];for(var O in r)C[O]=r[O];return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;x=null;var n=e.tokenize(t,e);return(n||x)&&"comment"!=n&&(k=null,e.state=e.state(x||n,t,e),k&&(n="error"==k?n+" error":k)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+S;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=a&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==C.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+S*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;r;){if(r.tagName==s[2]){r=r.prev;break}if(!C.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(s)for(;r;){var l=C.contextGrabbers[r.tagName];if(!l||!l.hasOwnProperty(s[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+S:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(t){t.state==_&&(t.state=y)}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof n&&"object"==typeof e?r(t("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],15:[function(t,e,n){n.read=function(t,e,n,i,r){var o,a,s=8*r-i-1,l=(1<<s)-1,u=l>>1,c=-7,h=n?r-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},n.write=function(t,e,n,i,r,o){var a,s,l,u=8*o-r-1,c=(1<<u)-1,h=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,m=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*l-1)*Math.pow(2,r),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,r),a=0));r>=8;t[n+f]=255&s,f+=p,s/=256,r-=8);for(a=a<<r|s,u+=r;u>0;t[n+f]=255&a,f+=p,a/=256,u-=8);t[n+f-p]|=128*m}},{}],16:[function(t,e,n){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}],17:[function(t,e,r){(function(t){(function(){function t(t){this.tokens=[],this.tokens.links={},this.options=t||d.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}function n(t,e){if(this.options=e||d.defaults,this.links=t,this.rules=p.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function o(t){this.options=t||{}}function a(t){this.tokens=[],this.token=null,this.options=t||d.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(t,e){return t.replace(e?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function l(t){return t.replace(/&([#\w]+);/g,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}function u(t,e){return t=t.source,e=e||"",function n(i,r){return i?(r=(r=r.source||r).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(i,r),n):new RegExp(t,e)}}function c(){}function h(t){for(var e,n,i=1;i<arguments.length;i++)for(n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function d(e,n,i){if(i||"function"==typeof n){i||(i=n,n=null);var r,o,l=(n=h({},d.defaults,n||{})).highlight,u=0;try{r=t.lex(e,n)}catch(t){return i(t)}o=r.length;var c=function(t){if(t)return n.highlight=l,i(t);var e;try{e=a.parse(r,n)}catch(e){t=e}return n.highlight=l,t?i(t):i(null,e)};if(!l||l.length<3)return c();if(delete n.highlight,!o)return c();for(;u<r.length;u++)!function(t){"code"!==t.type?--o||c():l(t.text,t.lang,(function(e,n){return e?c(e):null==n||n===t.text?--o||c():(t.text=n,t.escaped=!0,void(--o||c()))}))}(r[u])}else try{return n&&(n=h({},d.defaults,n)),a.parse(t.lex(e,n),n)}catch(t){if(t.message+="\nPlease report this to https://github.com/chjj/marked.",(n||d.defaults).silent)return"<p>An error occured:</p><pre>"+s(t.message+"",!0)+"</pre>";throw t}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:c,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:c,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:c,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/,bullet:/(?:[*+-]|\d+\.)/,item:/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/};f.item=u(f.item,"gm")(/bull/g,f.bullet)(),f.list=u(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=u(f.blockquote)("def",f.def)(),f._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",f.html=u(f.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,f._tag)(),f.paragraph=u(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=h({},f),f.gfm=h({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=u(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=h({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=f,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},t.prototype.token=function(t,e,n){var i,r,o,a,s,l,u,c,h;for(t=t.replace(/^ +$/gm,"");t;)if((o=this.rules.newline.exec(t))&&(t=t.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(t))t=t.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(t))t=t.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(t))t=t.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(e&&(o=this.rules.nptable.exec(t))){for(t=t.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].split(/ *\| */);this.tokens.push(l)}else if(o=this.rules.lheading.exec(t))t=t.substring(o[0].length),this.tokens.push({type:"heading",depth:"="===o[2]?1:2,text:o[1]});else if(o=this.rules.hr.exec(t))t=t.substring(o[0].length),this.tokens.push({type:"hr"});else if(o=this.rules.blockquote.exec(t))t=t.substring(o[0].length),this.tokens.push({type:"blockquote_start"}),o=o[0].replace(/^ *> ?/gm,""),this.token(o,e,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(t)){for(t=t.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),i=!1,h=(o=o[0].match(this.rules.item)).length,c=0;h>c;c++)u=(l=o[c]).length,~(l=l.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(u-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+u+"}","gm"),"")),this.options.smartLists&&c!==h-1&&(a===(s=f.bullet.exec(o[c+1])[0])||a.length>1&&s.length>1||(t=o.slice(c+1).join("\n")+t,c=h-1)),r=i||/\n\n(?!\s*$)/.test(l),c!==h-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(t))t=t.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&e&&(o=this.rules.def.exec(t)))t=t.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(e&&(o=this.rules.table.exec(t))){for(t=t.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(l)}else if(e&&(o=this.rules.paragraph.exec(t)))t=t.substring(o[0].length),this.tokens.push({type:"paragraph",text:"\n"===o[1].charAt(o[1].length-1)?o[1].slice(0,-1):o[1]});else if(o=this.rules.text.exec(t))t=t.substring(o[0].length),this.tokens.push({type:"text",text:o[0]});else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0));return this.tokens};var p={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:c,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:c,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/,_inside:/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,_href:/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/};p.link=u(p.link)("inside",p._inside)("href",p._href)(),p.reflink=u(p.reflink)("inside",p._inside)(),p.normal=h({},p),p.pedantic=h({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=h({},p.normal,{escape:u(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:u(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=h({},p.gfm,{br:u(p.br)("{2,}","*")(),text:u(p.gfm.text)("{2,}","*")()}),n.rules=p,n.output=function(t,e,i){return new n(e,i).output(t)},n.prototype.output=function(t){for(var e,n,i,r,o="";t;)if(r=this.rules.escape.exec(t))t=t.substring(r[0].length),o+=r[1];else if(r=this.rules.autolink.exec(t))t=t.substring(r[0].length),"@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),i=this.mangle("mailto:")+n):i=n=s(r[1]),o+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(t))){if(r=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(r[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(r[0])&&(this.inLink=!1),t=t.substring(r[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):s(r[0]):r[0];else if(r=this.rules.link.exec(t))t=t.substring(r[0].length),this.inLink=!0,o+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(t))||(r=this.rules.nolink.exec(t))){if(t=t.substring(r[0].length),e=(r[2]||r[1]).replace(/\s+/g," "),!(e=this.links[e.toLowerCase()])||!e.href){o+=r[0].charAt(0),t=r[0].substring(1)+t;continue}this.inLink=!0,o+=this.outputLink(r,e),this.inLink=!1}else if(r=this.rules.strong.exec(t))t=t.substring(r[0].length),o+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(t))t=t.substring(r[0].length),o+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(t))t=t.substring(r[0].length),o+=this.renderer.codespan(s(r[2],!0));else if(r=this.rules.br.exec(t))t=t.substring(r[0].length),o+=this.renderer.br();else if(r=this.rules.del.exec(t))t=t.substring(r[0].length),o+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(t))t=t.substring(r[0].length),o+=this.renderer.text(s(this.smartypants(r[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(r[0].length),i=n=s(r[1]),o+=this.renderer.link(i,null,n);return o},n.prototype.outputLink=function(t,e){var n=s(e.href),i=e.title?s(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(n,i,this.output(t[1])):this.renderer.image(n,i,s(t[1]))},n.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},n.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var e,n="",i=t.length,r=0;i>r;r++)e=t.charCodeAt(r),Math.random()>.5&&(e="x"+e.toString(16)),n+="&#"+e+";";return n},o.prototype.code=function(t,e,n){if(this.options.highlight){var i=this.options.highlight(t,e);null!=i&&i!==t&&(n=!0,t=i)}return e?'<pre><code class="'+this.options.langPrefix+s(e,!0)+'">'+(n?t:s(t,!0))+"\n</code></pre>\n":"<pre><code>"+(n?t:s(t,!0))+"\n</code></pre>"},o.prototype.blockquote=function(t){return"<blockquote>\n"+t+"</blockquote>\n"},o.prototype.html=function(t){return t},o.prototype.heading=function(t,e,n){return"<h"+e+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+t+"</h"+e+">\n"},o.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},o.prototype.list=function(t,e){var n=e?"ol":"ul";return"<"+n+">\n"+t+"</"+n+">\n"},o.prototype.listitem=function(t){return"<li>"+t+"</li>\n"},o.prototype.paragraph=function(t){return"<p>"+t+"</p>\n"},o.prototype.table=function(t,e){return"<table>\n<thead>\n"+t+"</thead>\n<tbody>\n"+e+"</tbody>\n</table>\n"},o.prototype.tablerow=function(t){return"<tr>\n"+t+"</tr>\n"},o.prototype.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' style="text-align:'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"},o.prototype.strong=function(t){return"<strong>"+t+"</strong>"},o.prototype.em=function(t){return"<em>"+t+"</em>"},o.prototype.codespan=function(t){return"<code>"+t+"</code>"},o.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},o.prototype.del=function(t){return"<del>"+t+"</del>"},o.prototype.link=function(t,e,n){if(this.options.sanitize){try{var i=decodeURIComponent(l(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='<a href="'+t+'"';return e&&(r+=' title="'+e+'"'),r+">"+n+"</a>"},o.prototype.image=function(t,e,n){var i='<img src="'+t+'" alt="'+n+'"';return e&&(i+=' title="'+e+'"'),i+(this.options.xhtml?"/>":">")},o.prototype.text=function(t){return t},a.parse=function(t,e,n){return new a(e,n).parse(t)},a.prototype.parse=function(t){this.inline=new n(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var e="";this.next();)e+=this.tok();return e},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,e,n,i,r="",o="";for(n="",t=0;t<this.token.header.length;t++)this.token.align[t],n+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(r+=this.renderer.tablerow(n),t=0;t<this.token.cells.length;t++){for(e=this.token.cells[t],n="",i=0;i<e.length;i++)n+=this.renderer.tablecell(this.inline.output(e[i]),{header:!1,align:this.token.align[i]});o+=this.renderer.tablerow(n)}return this.renderer.table(r,o);case"blockquote_start":for(o="";"blockquote_end"!==this.next().type;)o+=this.tok();return this.renderer.blockquote(o);case"list_start":o="";for(var a=this.token.ordered;"list_end"!==this.next().type;)o+=this.tok();return this.renderer.list(o,a);case"list_item_start":for(o="";"list_item_end"!==this.next().type;)o+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(o);case"loose_item_start":for(o="";"list_item_end"!==this.next().type;)o+=this.tok();return this.renderer.listitem(o);case"html":var s=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(s);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},c.exec=c,d.options=d.setOptions=function(t){return h(d.defaults,t),d},d.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new o,xhtml:!1},d.Parser=a,d.parser=a.parse,d.Renderer=o,d.Lexer=t,d.lexer=t.lex,d.InlineLexer=n,d.inlineLexer=n.output,d.parse=d,void 0!==e&&"object"==typeof r?e.exports=d:"function"==typeof i&&i.amd?i((function(){return d})):this.marked=d}).call(function(){return this||("undefined"!=typeof window?window:t)}())}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],18:[function(t,e,n){(function(n,i){"use strict";var r=function(t,e,n,r){if(r=r||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=r.flags||{},t){if(this.dictionary=t,"undefined"!=typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension)e||(e=this._readFile(chrome.extension.getURL("lib/typo/dictionaries/"+t+"/"+t+".aff"))),n||(n=this._readFile(chrome.extension.getURL("lib/typo/dictionaries/"+t+"/"+t+".dic")));else{if(r.dictionaryPath)var o=r.dictionaryPath;else o=void 0!==i?i+"/dictionaries":"./dictionaries";e||(e=this._readFile(o+"/"+t+"/"+t+".aff")),n||(n=this._readFile(o+"/"+t+"/"+t+".dic"))}this.rules=this._parseAFF(e),this.compoundRuleCodes={};for(var a=0,s=this.compoundRules.length;s>a;a++)for(var l=this.compoundRules[a],u=0,c=l.length;c>u;u++)this.compoundRuleCodes[l[u]]=[];for(var a in"ONLYINCOMPOUND"in this.flags&&(this.compoundRuleCodes[this.flags.ONLYINCOMPOUND]=[]),this.dictionaryTable=this._parseDIC(n),this.compoundRuleCodes)0==this.compoundRuleCodes[a].length&&delete this.compoundRuleCodes[a];for(a=0,s=this.compoundRules.length;s>a;a++){var h=this.compoundRules[a],d="";for(u=0,c=h.length;c>u;u++){var f=h[u];d+=f in this.compoundRuleCodes?"("+this.compoundRuleCodes[f].join("|")+")":f}this.compoundRules[a]=new RegExp(d,"i")}}return this};r.prototype={load:function(t){for(var e in t)this[e]=t[e];return this},_readFile:function(e,i){if(i||(i="utf8"),"undefined"!=typeof XMLHttpRequest){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.overrideMimeType&&r.overrideMimeType("text/plain; charset="+i),r.send(null),r.responseText}if(void 0!==t){var o=t("fs");try{if(o.existsSync(e)){var a=o.statSync(e),s=o.openSync(e,"r"),l=new n(a.size);return o.readSync(s,l,0,l.length,null),l.toString(i,0,l.length)}}catch(t){return""}}},_parseAFF:function(t){for(var e={},n=(t=this._removeAffixComments(t)).split("\n"),i=0,r=n.length;r>i;i++){var o=(b=n[i]).split(/\s+/),a=o[0];if("PFX"==a||"SFX"==a){for(var s=o[1],l=o[2],u=[],c=i+1,h=i+1+(y=parseInt(o[3],10));h>c;c++){var d=(_=(b=n[c]).split(/\s+/))[2],f=_[3].split("/"),p=f[0];"0"===p&&(p="");var m=this.parseRuleCodes(f[1]),g=_[4],v={};v.add=p,m.length>0&&(v.continuationClasses=m),"."!==g&&(v.match="SFX"===a?new RegExp(g+"$"):new RegExp("^"+g)),"0"!=d&&(v.remove="SFX"===a?new RegExp(d+"$"):d),u.push(v)}e[s]={type:a,combineable:"Y"==l,entries:u},i+=y}else if("COMPOUNDRULE"===a){var y;for(c=i+1,h=i+1+(y=parseInt(o[1],10));h>c;c++){var b,_=(b=n[c]).split(/\s+/);this.compoundRules.push(_[1])}i+=y}else"REP"===a?3===(_=b.split(/\s+/)).length&&this.replacementTable.push([_[1],_[2]]):this.flags[a]=o[1]}return e},_removeAffixComments:function(t){return(t=(t=(t=t.replace(/#.*$/gm,"")).replace(/^\s\s*/m,"").replace(/\s\s*$/m,"")).replace(/\n{2,}/g,"\n")).replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(t){function e(t,e){t in i&&"object"==typeof i[t]||(i[t]=[]),i[t].push(e)}for(var n=(t=this._removeDicComments(t)).split("\n"),i={},r=1,o=n.length;o>r;r++){var a=n[r].split("/",2),s=a[0];if(a.length>1){var l=this.parseRuleCodes(a[1]);"NEEDAFFIX"in this.flags&&-1!=l.indexOf(this.flags.NEEDAFFIX)||e(s,l);for(var u=0,c=l.length;c>u;u++){var h=l[u],d=this.rules[h];if(d)for(var f=this._applyRule(s,d),p=0,m=f.length;m>p;p++){var g=f[p];if(e(g,[]),d.combineable)for(var v=u+1;c>v;v++){var y=l[v],b=this.rules[y];if(b&&b.combineable&&d.type!=b.type)for(var _=this._applyRule(g,b),w=0,x=_.length;x>w;w++)e(_[w],[])}}h in this.compoundRuleCodes&&this.compoundRuleCodes[h].push(s)}}else e(s.trim(),[])}return i},_removeDicComments:function(t){return t.replace(/^\t.*$/gm,"")},parseRuleCodes:function(t){if(!t)return[];if(!("FLAG"in this.flags))return t.split("");if("long"===this.flags.FLAG){for(var e=[],n=0,i=t.length;i>n;n+=2)e.push(t.substr(n,2));return e}return"num"===this.flags.FLAG?textCode.split(","):void 0},_applyRule:function(t,e){for(var n=e.entries,i=[],r=0,o=n.length;o>r;r++){var a=n[r];if(!a.match||t.match(a.match)){var s=t;if(a.remove&&(s=s.replace(a.remove,"")),"SFX"===e.type?s+=a.add:s=a.add+s,i.push(s),"continuationClasses"in a)for(var l=0,u=a.continuationClasses.length;u>l;l++){var c=this.rules[a.continuationClasses[l]];c&&(i=i.concat(this._applyRule(s,c)))}}}return i},check:function(t){var e=t.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(e))return!0;if(e.toUpperCase()===e){var n=e[0]+e.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}var i=e.toLowerCase();if(i!==e){if(this.hasFlag(i,"KEEPCASE"))return!1;if(this.checkExact(i))return!0}return!1},checkExact:function(t){var e=this.dictionaryTable[t];if(void 0===e){if("COMPOUNDMIN"in this.flags&&t.length>=this.flags.COMPOUNDMIN)for(var n=0,i=this.compoundRules.length;i>n;n++)if(t.match(this.compoundRules[n]))return!0;return!1}if("object"==typeof e){for(n=0,i=e.length;i>n;n++)if(!this.hasFlag(t,"ONLYINCOMPOUND",e[n]))return!0;return!1}},hasFlag:function(t,e,n){return!(!(e in this.flags)||(void 0===n&&(n=Array.prototype.concat.apply([],this.dictionaryTable[t])),!n||-1===n.indexOf(this.flags[e])))},alphabet:"",suggest:function(t,e){function n(t){for(var e=[],n=0,i=t.length;i>n;n++){for(var r=t[n],o=[],a=0,s=r.length+1;s>a;a++)o.push([r.substring(0,a),r.substring(a,r.length)]);var l=[];for(a=0,s=o.length;s>a;a++)(m=o[a])[1]&&l.push(m[0]+m[1].substring(1));var c=[];for(a=0,s=o.length;s>a;a++)(m=o[a])[1].length>1&&c.push(m[0]+m[1][1]+m[1][0]+m[1].substring(2));var h=[];for(a=0,s=o.length;s>a;a++)if((m=o[a])[1])for(var d=0,f=u.alphabet.length;f>d;d++)h.push(m[0]+u.alphabet[d]+m[1].substring(1));var p=[];for(a=0,s=o.length;s>a;a++){var m;if((m=o[a])[1])for(d=0,f=u.alphabet.length;f>d;d++)h.push(m[0]+u.alphabet[d]+m[1])}e=(e=(e=(e=e.concat(l)).concat(c)).concat(h)).concat(p)}return e}function i(t){for(var e=[],n=0;n<t.length;n++)u.check(t[n])&&e.push(t[n]);return e}function r(t){function r(t,e){return t[1]<e[1]?-1:1}for(var o=n([t]),a=n(o),s=i(o).concat(i(a)),l={},c=0,h=s.length;h>c;c++)s[c]in l?l[s[c]]+=1:l[s[c]]=1;var d=[];for(var c in l)d.push([c,l[c]]);d.sort(r).reverse();var f=[];for(c=0,h=Math.min(e,d.length);h>c;c++)u.hasFlag(d[c][0],"NOSUGGEST")||f.push(d[c][0]);return f}if(e||(e=5),this.check(t))return[];for(var o=0,a=this.replacementTable.length;a>o;o++){var s=this.replacementTable[o];if(-1!==t.indexOf(s[0])){var l=t.replace(s[0],s[1]);if(this.check(l))return[l]}}var u=this;return u.alphabet="abcdefghijklmnopqrstuvwxyz",r(t)}},void 0!==e&&(e.exports=r)}).call(this,t("buffer").Buffer,"/node_modules/typo-js")},{buffer:3,fs:2}],19:[function(t,e,n){var i=t("codemirror");i.commands.tabAndIndentMarkdownList=function(t){var e=t.listSelections()[0].head;if(!1!==t.getStateAfter(e.line).list)t.execCommand("indentMore");else if(t.options.indentWithTabs)t.execCommand("insertTab");else{var n=Array(t.options.tabSize+1).join(" ");t.replaceSelection(n)}},i.commands.shiftTabAndUnindentMarkdownList=function(t){var e=t.listSelections()[0].head;if(!1!==t.getStateAfter(e.line).list)t.execCommand("indentLess");else if(t.options.indentWithTabs)t.execCommand("insertTab");else{var n=Array(t.options.tabSize+1).join(" ");t.replaceSelection(n)}}},{codemirror:10}],20:[function(t,e,n){"use strict";function i(t){return W?t.replace("Ctrl","Cmd"):t.replace("Cmd","Ctrl")}function r(t,e,n){t=t||{};var i=document.createElement("a");return e=null==e||e,t.title&&e&&(i.title=a(t.title,t.action,n),W&&(i.title=i.title.replace("Ctrl","⌘"),i.title=i.title.replace("Alt","⌥"))),i.tabIndex=-1,i.className=t.className,i}function o(){var t=document.createElement("i");return t.className="separator",t.innerHTML="|",t}function a(t,e,n){var r,o=t;return e&&n[r=Z(e)]&&(o+=" ("+i(n[r])+")"),o}function s(t,e){e=e||t.getCursor("start");var n=t.getTokenAt(e);if(!n.type)return{};for(var i,r,o=n.type.split(" "),a={},s=0;s<o.length;s++)"strong"===(i=o[s])?a.bold=!0:"variable-2"===i?(r=t.getLine(e.line),/^\s*\d+\.\s/.test(r)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===i?a.quote=!0:"em"===i?a.italic=!0:"quote"===i?a.quote=!0:"strikethrough"===i?a.strikethrough=!0:"comment"===i?a.code=!0:"link"===i?a.link=!0:"tag"===i?a.image=!0:i.match(/^header(\-[1-6])?$/)&&(a[i.replace("header","heading")]=!0);return a}function l(t){var e=t.codemirror;e.setOption("fullScreen",!e.getOption("fullScreen")),e.getOption("fullScreen")?($=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=$;var n=e.getWrapperElement();/fullscreen/.test(n.previousSibling.className)?n.previousSibling.className=n.previousSibling.className.replace(/\s*fullscreen\b/,""):n.previousSibling.className+=" fullscreen";var i=t.toolbarElements.fullscreen;/active/.test(i.className)?i.className=i.className.replace(/\s*active\s*/g,""):i.className+=" active";var r=e.getWrapperElement().nextSibling;/editor-preview-active-side/.test(r.className)&&E(t)}function u(t){N(t,"bold",t.options.blockStyles.bold)}function c(t){N(t,"italic",t.options.blockStyles.italic)}function h(t){N(t,"strikethrough","~~")}function d(t){function e(t){if("object"!=typeof t)throw"fencing_line() takes a 'line' object (not a line number, or line text).  Got: "+typeof t+": "+t;return t.styles&&t.styles[2]&&-1!==t.styles[2].indexOf("formatting-code-block")}function n(t){return t.state.base.base||t.state.base}function i(t,i,r,o,a){r=r||t.getLineHandle(i),o=o||t.getTokenAt({line:i,ch:1}),a=a||!!r.text&&t.getTokenAt({line:i,ch:r.text.length-1});var s=o.type?o.type.split(" "):[];return a&&n(a).indentedCode?"indented":-1!==s.indexOf("comment")&&(n(o).fencedChars||n(a).fencedChars||e(r)?"fenced":"single")}function r(t,e,n,i){var r=e.line+1,o=n.line+1,a=e.line!==n.line,s=i+"\n",l="\n"+i;a&&o++,a&&0===n.ch&&(l=i+"\n",o--),L(t,!1,[s,l]),t.setSelection({line:r,ch:0},{line:o,ch:0})}var o,a,s,l=t.options.blockStyles.code,u=t.codemirror,c=u.getCursor("start"),h=u.getCursor("end"),d=u.getTokenAt({line:c.line,ch:c.ch||1}),f=u.getLineHandle(c.line),p=i(u,c.line,f,d);if("single"===p){var m=f.text.slice(0,c.ch).replace("`",""),g=f.text.slice(c.ch).replace("`","");u.replaceRange(m+g,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),c.ch--,c!==h&&h.ch--,u.setSelection(c,h),u.focus()}else if("fenced"===p)if(c.line!==h.line||c.ch!==h.ch){for(o=c.line;o>=0&&!e(f=u.getLineHandle(o));o--);var v,y,b,_,w=n(u.getTokenAt({line:o,ch:1})).fencedChars;e(u.getLineHandle(c.line))?(v="",y=c.line):e(u.getLineHandle(c.line-1))?(v="",y=c.line-1):(v=w+"\n",y=c.line),e(u.getLineHandle(h.line))?(b="",_=h.line,0===h.ch&&(_+=1)):0!==h.ch&&e(u.getLineHandle(h.line+1))?(b="",_=h.line+1):(b=w+"\n",_=h.line+1),0===h.ch&&(_-=1),u.operation((function(){u.replaceRange(b,{line:_,ch:0},{line:_+(b?0:1),ch:0}),u.replaceRange(v,{line:y,ch:0},{line:y+(v?0:1),ch:0})})),u.setSelection({line:y+(v?1:0),ch:0},{line:_+(v?1:-1),ch:0}),u.focus()}else{var x=c.line;if(e(u.getLineHandle(c.line))&&("fenced"===i(u,c.line+1)?(o=c.line,x=c.line+1):(a=c.line,x=c.line-1)),void 0===o)for(o=x;o>=0&&!e(f=u.getLineHandle(o));o--);if(void 0===a)for(s=u.lineCount(),a=x;s>a&&!e(f=u.getLineHandle(a));a++);u.operation((function(){u.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),u.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})})),u.focus()}else if("indented"===p){if(c.line!==h.line||c.ch!==h.ch)o=c.line,a=h.line,0===h.ch&&a--;else{for(o=c.line;o>=0;o--)if(!(f=u.getLineHandle(o)).text.match(/^\s*$/)&&"indented"!==i(u,o,f)){o+=1;break}for(s=u.lineCount(),a=c.line;s>a;a++)if(!(f=u.getLineHandle(a)).text.match(/^\s*$/)&&"indented"!==i(u,a,f)){a-=1;break}}var k=u.getLineHandle(a+1),S=k&&u.getTokenAt({line:a+1,ch:k.text.length-1});S&&n(S).indentedCode&&u.replaceRange("\n",{line:a+1,ch:0});for(var C=o;a>=C;C++)u.indentLine(C,"subtract");u.focus()}else{var T=c.line===h.line&&c.ch===h.ch&&0===c.ch,O=c.line!==h.line;T||O?r(u,c,h,l):L(u,!1,["`","`"])}}function f(t){P(t.codemirror,"quote")}function p(t){M(t.codemirror,"smaller")}function m(t){M(t.codemirror,"bigger")}function g(t){M(t.codemirror,void 0,1)}function v(t){M(t.codemirror,void 0,2)}function y(t){M(t.codemirror,void 0,3)}function b(t){P(t.codemirror,"unordered-list")}function _(t){P(t.codemirror,"ordered-list")}function w(t){D(t.codemirror)}function x(t){var e=t.codemirror,n=s(e),i=t.options,r="http://";return!(i.promptURLs&&(r=prompt(i.promptTexts.link),!r))&&void L(e,n.link,i.insertTexts.link,r)}function k(t){var e=t.codemirror,n=s(e),i=t.options,r="http://";return!(i.promptURLs&&(r=prompt(i.promptTexts.image),!r))&&void L(e,n.image,i.insertTexts.image,r)}function S(t){var e=t.codemirror,n=s(e),i=t.options;L(e,n.table,i.insertTexts.table)}function C(t){var e=t.codemirror,n=s(e),i=t.options;L(e,n.image,i.insertTexts.horizontalRule)}function T(t){var e=t.codemirror;e.undo(),e.focus()}function O(t){var e=t.codemirror;e.redo(),e.focus()}function E(t){var e=t.codemirror,n=e.getWrapperElement(),i=n.nextSibling,r=t.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(i.className)?(i.className=i.className.replace(/\s*editor-preview-active-side\s*/g,""),r.className=r.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){e.getOption("fullScreen")||l(t),i.className+=" editor-preview-active-side"}),1),r.className+=" active",n.className+=" CodeMirror-sided",o=!0);var a=n.lastChild;if(/editor-preview-active/.test(a.className)){a.className=a.className.replace(/\s*editor-preview-active\s*/g,"");var s=t.toolbarElements.preview,u=n.previousSibling;s.className=s.className.replace(/\s*active\s*/g,""),u.className=u.className.replace(/\s*disabled-for-preview*/g,"")}var c=function(){i.innerHTML=t.options.previewRender(t.value(),i)};e.sideBySideRenderingFunction||(e.sideBySideRenderingFunction=c),o?(i.innerHTML=t.options.previewRender(t.value(),i),e.on("update",e.sideBySideRenderingFunction)):e.off("update",e.sideBySideRenderingFunction),e.refresh()}function A(t){var e=t.codemirror,n=e.getWrapperElement(),i=n.previousSibling,r=!!t.options.toolbar&&t.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||((o=document.createElement("div")).className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),r&&(r.className=r.className.replace(/\s*active\s*/g,""),i.className=i.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout((function(){o.className+=" editor-preview-active"}),1),r&&(r.className+=" active",i.className+=" disabled-for-preview")),o.innerHTML=t.options.previewRender(t.value(),o);var a=e.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&E(t)}function L(t,e,n,i){if(!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)){var r,o=n[0],a=n[1],s=t.getCursor("start"),l=t.getCursor("end");i&&(a=a.replace("#url#",i)),e?(o=(r=t.getLine(s.line)).slice(0,s.ch),a=r.slice(s.ch),t.replaceRange(o+a,{line:s.line,ch:0})):(r=t.getSelection(),t.replaceSelection(o+r+a),s.ch+=o.length,s!==l&&(l.ch+=o.length)),t.setSelection(s,l),t.focus()}}function M(t,e,n){if(!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)){for(var i=t.getCursor("start"),r=t.getCursor("end"),o=i.line;o<=r.line;o++)!function(i){var r=t.getLine(i),o=r.search(/[^#]/);r=void 0!==e?0>=o?"bigger"==e?"###### "+r:"# "+r:6==o&&"smaller"==e?r.substr(7):1==o&&"bigger"==e?r.substr(2):"bigger"==e?r.substr(1):"#"+r:1==n?0>=o?"# "+r:o==n?r.substr(o+1):"# "+r.substr(o+1):2==n?0>=o?"## "+r:o==n?r.substr(o+1):"## "+r.substr(o+1):0>=o?"### "+r:o==n?r.substr(o+1):"### "+r.substr(o+1),t.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(o);t.focus()}}function P(t,e){if(!/editor-preview-active/.test(t.getWrapperElement().lastChild.className)){for(var n=s(t),i=t.getCursor("start"),r=t.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},l=i.line;l<=r.line;l++)!function(i){var r=t.getLine(i);r=n[e]?r.replace(o[e],"$1"):a[e]+r,t.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(l);t.focus()}}function N(t,e,n,i){if(!/editor-preview-active/.test(t.codemirror.getWrapperElement().lastChild.className)){i=void 0===i?n:i;var r,o=t.codemirror,a=s(o),l=n,u=i,c=o.getCursor("start"),h=o.getCursor("end");a[e]?(l=(r=o.getLine(c.line)).slice(0,c.ch),u=r.slice(c.ch),"bold"==e?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),u=u.replace(/(\*\*|__)/,"")):"italic"==e?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),u=u.replace(/(\*|_)/,"")):"strikethrough"==e&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),u=u.replace(/(\*\*|~~)/,"")),o.replaceRange(l+u,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),"bold"==e||"strikethrough"==e?(c.ch-=2,c!==h&&(h.ch-=2)):"italic"==e&&(c.ch-=1,c!==h&&(h.ch-=1))):(r=o.getSelection(),"bold"==e?r=(r=r.split("**").join("")).split("__").join(""):"italic"==e?r=(r=r.split("*").join("")).split("_").join(""):"strikethrough"==e&&(r=r.split("~~").join("")),o.replaceSelection(l+r+u),c.ch+=n.length,h.ch=c.ch+r.length),o.setSelection(c,h),o.focus()}}function D(t){if(!/editor-preview-active/.test(t.getWrapperElement().lastChild.className))for(var e,n=t.getCursor("start"),i=t.getCursor("end"),r=n.line;r<=i.line;r++)e=(e=t.getLine(r)).replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),t.replaceRange(e,{line:r,ch:0},{line:r,ch:99999999999999})}function j(t,e){for(var n in e)e.hasOwnProperty(n)&&(e[n]instanceof Array?t[n]=e[n].concat(t[n]instanceof Array?t[n]:[]):null!==e[n]&&"object"==typeof e[n]&&e[n].constructor===Object?t[n]=j(t[n]||{},e[n]):t[n]=e[n]);return t}function I(t){for(var e=1;e<arguments.length;e++)t=j(t,arguments[e]);return t}function R(t){var e=/[a-zA-Z0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,n=t.match(e),i=0;if(null===n)return i;for(var r=0;r<n.length;r++)i+=n[r].charCodeAt(0)>=19968?n[r].length:1;return i}function F(t){(t=t||{}).parent=this;var e=!0;if(!1===t.autoDownloadFontAwesome&&(e=!1),!0!==t.autoDownloadFontAwesome)for(var n=document.styleSheets,i=0;i<n.length;i++)n[i].href&&n[i].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(e=!1);if(e){var r=document.createElement("link");r.rel="stylesheet",r.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(r)}if(t.element)this.element=t.element;else if(null===t.element)return;if(void 0===t.toolbar)for(var o in t.toolbar=[],G)G.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&t.toolbar.push("|"),(!0===G[o].default||t.showIcons&&t.showIcons.constructor===Array&&-1!=t.showIcons.indexOf(o))&&t.toolbar.push(o));t.hasOwnProperty("status")||(t.status=["autosave","lines","words","cursor"]),t.previewRender||(t.previewRender=function(t){return this.parent.markdown(t)}),t.parsingConfig=I({highlightFormatting:!0},t.parsingConfig||{}),t.insertTexts=I({},K,t.insertTexts||{}),t.promptTexts=X,t.blockStyles=I({},J,t.blockStyles||{}),t.shortcuts=I({},V,t.shortcuts||{}),null!=t.autosave&&null!=t.autosave.unique_id&&""!=t.autosave.unique_id&&(t.autosave.uniqueId=t.autosave.unique_id),this.options=t,this.render(),!t.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(t.initialValue)}function B(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(t){return!1}return!0}var z=t("codemirror");t("codemirror/addon/edit/continuelist.js"),t("./codemirror/tablist"),t("codemirror/addon/display/fullscreen.js"),t("codemirror/mode/markdown/markdown.js"),t("codemirror/addon/mode/overlay.js"),t("codemirror/addon/display/placeholder.js"),t("codemirror/addon/selection/mark-selection.js"),t("codemirror/mode/gfm/gfm.js"),t("codemirror/mode/xml/xml.js");var q=t("codemirror-spell-checker"),H=t("marked"),W=/Mac/.test(navigator.platform),U={toggleBold:u,toggleItalic:c,drawLink:x,toggleHeadingSmaller:p,toggleHeadingBigger:m,drawImage:k,toggleBlockquote:f,toggleOrderedList:_,toggleUnorderedList:b,toggleCodeBlock:d,togglePreview:A,toggleStrikethrough:h,toggleHeading1:g,toggleHeading2:v,toggleHeading3:y,cleanBlock:w,drawTable:S,drawHorizontalRule:C,undo:T,redo:O,toggleSideBySide:E,toggleFullScreen:l},V={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Z=function(t){for(var e in U)if(U[e]===t)return e;return null},Y=function(){var t=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)}(navigator.userAgent||navigator.vendor||window.opera),t},$="",G={bold:{name:"bold",action:u,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:c,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:h,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:p,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:p,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:m,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:g,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:v,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:y,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:d,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:f,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:b,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:_,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:w,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:x,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:k,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:S,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:C,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:A,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:E,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:l,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:T,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:O,className:"fa fa-repeat no-disable",title:"Redo"}},K={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text     | Text     | Text     |\n\n"],horizontalRule:["","\n\n-----\n\n"]},X={link:"URL for the link:",image:"URL of the image:"},J={bold:"**",code:"```",italic:"*"};F.prototype.markdown=function(t){if(H){var e={};return this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?e.breaks=!1:e.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting&&window.hljs&&(e.highlight=function(t){return window.hljs.highlightAuto(t).value}),H.setOptions(e),H(t)}},F.prototype.render=function(t){if(t||(t=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==t){this.element=t;var e,n,r=this.options,o=this,a={};for(var s in r.shortcuts)null!==r.shortcuts[s]&&null!==U[s]&&function(t){a[i(r.shortcuts[t])]=function(){U[t](o)}}(s);if(a.Enter="newlineAndIndentContinueMarkdownList",a.Tab="tabAndIndentMarkdownList",a["Shift-Tab"]="shiftTabAndUnindentMarkdownList",a.Esc=function(t){t.getOption("fullScreen")&&l(o)},document.addEventListener("keydown",(function(t){27==(t=t||window.event).keyCode&&o.codemirror.getOption("fullScreen")&&l(o)}),!1),!1!==r.spellChecker?(e="spell-checker",(n=r.parsingConfig).name="gfm",n.gitHubSpice=!1,q({codeMirrorInstance:z})):((e=r.parsingConfig).name="gfm",e.gitHubSpice=!1),this.codemirror=z.fromTextArea(t,{mode:e,backdrop:n,theme:"paper",tabSize:null!=r.tabSize?r.tabSize:2,indentUnit:null!=r.tabSize?r.tabSize:2,indentWithTabs:!1!==r.indentWithTabs,lineNumbers:!1,autofocus:!0===r.autofocus,extraKeys:a,lineWrapping:!1!==r.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:r.placeholder||t.getAttribute("placeholder")||"",styleSelectedText:null==r.styleSelectedText||r.styleSelectedText}),!0===r.forceSync){var u=this.codemirror;u.on("change",(function(){u.save()}))}this.gui={},!1!==r.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==r.status&&(this.gui.statusbar=this.createStatusbar()),null!=r.autosave&&!0===r.autosave.enabled&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var c=this.codemirror;setTimeout(function(){c.refresh()}.bind(c),0)}},F.prototype.autosave=function(){if(B()){var t=this;if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return;null!=t.element.form&&null!=t.element.form&&t.element.form.addEventListener("submit",(function(){localStorage.removeItem("smde_"+t.options.autosave.uniqueId)})),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,t.value());var e=document.getElementById("autosaved");if(null!=e&&null!=e&&""!=e){var n=new Date,i=n.getHours(),r=n.getMinutes(),o="am",a=i;a>=12&&(a=i-12,o="pm"),0==a&&(a=12),r=10>r?"0"+r:r,e.innerHTML="Autosaved: "+a+":"+r+" "+o}this.autosaveTimeoutId=setTimeout((function(){t.autosave()}),this.options.autosave.delay||1e4)}},F.prototype.clearAutosavedValue=function(){if(B()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return;localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}},F.prototype.createSideBySide=function(){var t=this.codemirror,e=t.getWrapperElement(),n=e.nextSibling;n&&/editor-preview-side/.test(n.className)||((n=document.createElement("div")).className="editor-preview-side",e.parentNode.insertBefore(n,e.nextSibling));var i=!1,r=!1;return t.on("scroll",(function(t){if(i)i=!1;else{r=!0;var e=t.getScrollInfo().height-t.getScrollInfo().clientHeight,o=parseFloat(t.getScrollInfo().top)/e,a=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=a}})),n.onscroll=function(){if(r)r=!1;else{i=!0;var e=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/e,a=(t.getScrollInfo().height-t.getScrollInfo().clientHeight)*o;t.scrollTo(0,a)}},n},F.prototype.createToolbar=function(t){if((t=t||this.options.toolbar)&&0!==t.length){var e;for(e=0;e<t.length;e++)null!=G[t[e]]&&(t[e]=G[t[e]]);var n=document.createElement("div");n.className="editor-toolbar";var i=this,a={};for(i.toolbar=t,e=0;e<t.length;e++)if(("guide"!=t[e].name||!1!==i.options.toolbarGuideIcon)&&!(i.options.hideIcons&&-1!=i.options.hideIcons.indexOf(t[e].name)||("fullscreen"==t[e].name||"side-by-side"==t[e].name)&&Y())){if("|"===t[e]){for(var l=!1,u=e+1;u<t.length;u++)"|"===t[u]||i.options.hideIcons&&-1!=i.options.hideIcons.indexOf(t[u].name)||(l=!0);if(!l)continue}!function(t){var e;e="|"===t?o():r(t,i.options.toolbarTips,i.options.shortcuts),t.action&&("function"==typeof t.action?e.onclick=function(e){e.preventDefault(),t.action(i)}:"string"==typeof t.action&&(e.href=t.action,e.target="_blank")),a[t.name||t]=e,n.appendChild(e)}(t[e])}i.toolbarElements=a;var c=this.codemirror;c.on("cursorActivity",(function(){var t=s(c);for(var e in a)!function(e){var n=a[e];t[e]?n.className+=" active":"fullscreen"!=e&&"side-by-side"!=e&&(n.className=n.className.replace(/\s*active\s*/g,""))}(e)}));var h=c.getWrapperElement();return h.parentNode.insertBefore(n,h),n}},F.prototype.createStatusbar=function(t){t=t||this.options.status;var e=this.options,n=this.codemirror;if(t&&0!==t.length){var i,r,o,a=[];for(i=0;i<t.length;i++)if(r=void 0,o=void 0,"object"==typeof t[i])a.push({className:t[i].className,defaultValue:t[i].defaultValue,onUpdate:t[i].onUpdate});else{var s=t[i];"words"===s?(o=function(t){t.innerHTML=R(n.getValue())},r=function(t){t.innerHTML=R(n.getValue())}):"lines"===s?(o=function(t){t.innerHTML=n.lineCount()},r=function(t){t.innerHTML=n.lineCount()}):"cursor"===s?(o=function(t){t.innerHTML="0:0"},r=function(t){var e=n.getCursor();t.innerHTML=e.line+":"+e.ch}):"autosave"===s&&(o=function(t){null!=e.autosave&&!0===e.autosave.enabled&&t.setAttribute("id","autosaved")}),a.push({className:s,defaultValue:o,onUpdate:r})}var l=document.createElement("div");for(l.className="editor-statusbar",i=0;i<a.length;i++){var u=a[i],c=document.createElement("span");c.className=u.className,"function"==typeof u.defaultValue&&u.defaultValue(c),"function"==typeof u.onUpdate&&this.codemirror.on("update",function(t,e){return function(){e.onUpdate(t)}}(c,u)),l.appendChild(c)}var h=this.codemirror.getWrapperElement();return h.parentNode.insertBefore(l,h.nextSibling),l}},F.prototype.value=function(t){return void 0===t?this.codemirror.getValue():(this.codemirror.getDoc().setValue(t),this)},F.toggleBold=u,F.toggleItalic=c,F.toggleStrikethrough=h,F.toggleBlockquote=f,F.toggleHeadingSmaller=p,F.toggleHeadingBigger=m,F.toggleHeading1=g,F.toggleHeading2=v,F.toggleHeading3=y,F.toggleCodeBlock=d,F.toggleUnorderedList=b,F.toggleOrderedList=_,F.cleanBlock=w,F.drawLink=x,F.drawImage=k,F.drawTable=S,F.drawHorizontalRule=C,F.undo=T,F.redo=O,F.togglePreview=A,F.toggleSideBySide=E,F.toggleFullScreen=l,F.prototype.toggleBold=function(){u(this)},F.prototype.toggleItalic=function(){c(this)},F.prototype.toggleStrikethrough=function(){h(this)},F.prototype.toggleBlockquote=function(){f(this)},F.prototype.toggleHeadingSmaller=function(){p(this)},F.prototype.toggleHeadingBigger=function(){m(this)},F.prototype.toggleHeading1=function(){g(this)},F.prototype.toggleHeading2=function(){v(this)},F.prototype.toggleHeading3=function(){y(this)},F.prototype.toggleCodeBlock=function(){d(this)},F.prototype.toggleUnorderedList=function(){b(this)},F.prototype.toggleOrderedList=function(){_(this)},F.prototype.cleanBlock=function(){w(this)},F.prototype.drawLink=function(){x(this)},F.prototype.drawImage=function(){k(this)},F.prototype.drawTable=function(){S(this)},F.prototype.drawHorizontalRule=function(){C(this)},F.prototype.undo=function(){T(this)},F.prototype.redo=function(){O(this)},F.prototype.togglePreview=function(){A(this)},F.prototype.toggleSideBySide=function(){E(this)},F.prototype.toggleFullScreen=function(){l(this)},F.prototype.isPreviewActive=function(){var t=this.codemirror.getWrapperElement().lastChild;return/editor-preview-active/.test(t.className)},F.prototype.isSideBySideActive=function(){var t=this.codemirror.getWrapperElement().nextSibling;return/editor-preview-active-side/.test(t.className)},F.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},F.prototype.getState=function(){return s(this.codemirror)},F.prototype.toTextArea=function(){var t=this.codemirror,e=t.getWrapperElement();e.parentNode&&(this.gui.toolbar&&e.parentNode.removeChild(this.gui.toolbar),this.gui.statusbar&&e.parentNode.removeChild(this.gui.statusbar),this.gui.sideBySide&&e.parentNode.removeChild(this.gui.sideBySide)),t.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},e.exports=F},{"./codemirror/tablist":19,codemirror:10,"codemirror-spell-checker":4,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/display/placeholder.js":6,"codemirror/addon/edit/continuelist.js":7,"codemirror/addon/mode/overlay.js":8,"codemirror/addon/selection/mark-selection.js":9,"codemirror/mode/gfm/gfm.js":11,"codemirror/mode/markdown/markdown.js":12,"codemirror/mode/xml/xml.js":14,marked:17}]},{},[20])(20)},246:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},s.apply(this,arguments)}function l(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}n.d(e,{Ay:()=>se});function u(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var c=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),h=u(/Edge/i),d=u(/firefox/i),f=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),p=u(/iP(ad|od|hone)/i),m=u(/chrome/i)&&u(/android/i),g={capture:!1,passive:!1};function v(t,e,n){t.addEventListener(e,n,!c&&g)}function y(t,e,n){t.removeEventListener(e,n,!c&&g)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function _(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,i){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||i&&t===n)return t;if(t===n)break}while(t=_(t))}return null}var x,k=/\s+/g;function S(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(k," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(k," ")}}function C(t,e,n){var i=t&&t.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=n+("string"==typeof n?"":"px")}}function T(t,e){var n="";if("string"==typeof t)n=t;else do{var i=C(t,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(t,e,n){if(t){var i=t.getElementsByTagName(e),r=0,o=i.length;if(n)for(;r<o;r++)n(i[r],r);return i}return[]}function E(){var t=document.scrollingElement;return t||document.documentElement}function A(t,e,n,i,r){if(t.getBoundingClientRect||t===window){var o,a,s,l,u,h,d;if(t!==window&&t.parentNode&&t!==E()?(a=(o=t.getBoundingClientRect()).top,s=o.left,l=o.bottom,u=o.right,h=o.height,d=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,h=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!c))do{if(r&&r.getBoundingClientRect&&("none"!==C(r,"transform")||n&&"static"!==C(r,"position"))){var f=r.getBoundingClientRect();a-=f.top+parseInt(C(r,"border-top-width")),s-=f.left+parseInt(C(r,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(r=r.parentNode);if(i&&t!==window){var p=T(r||t),m=p&&p.a,g=p&&p.d;p&&(l=(a/=g)+(h/=g),u=(s/=m)+(d/=m))}return{top:a,left:s,bottom:l,right:u,width:d,height:h}}}function L(t,e,n){for(var i=j(t,!0),r=A(t)[e];i;){var o=A(i)[n];if(!("top"===n||"left"===n?r>=o:r<=o))return i;if(i===E())break;i=j(i,!1)}return!1}function M(t,e,n,i){for(var r=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==zt.ghost&&(i||a[o]!==zt.dragged)&&w(a[o],n.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function P(t,e){for(var n=t.lastElementChild;n&&(n===zt.ghost||"none"===C(n,"display")||e&&!b(n,e));)n=n.previousElementSibling;return n||null}function N(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===zt.clone||e&&!b(t,e)||n++;return n}function D(t){var e=0,n=0,i=E();if(t)do{var r=T(t),o=r.a,a=r.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==i&&(t=t.parentNode));return[e,n]}function j(t,e){if(!t||!t.getBoundingClientRect)return E();var n=t,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=C(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return E();if(i||e)return n;i=!0}}}while(n=n.parentNode);return E()}function I(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function R(t,e){return function(){if(!x){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),x=setTimeout((function(){x=void 0}),e)}}}function F(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function B(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function z(t,e,n){var i={};return Array.from(t.children).forEach((function(r){var o,a,s,l;if(w(r,e.draggable,t,!1)&&!r.animated&&r!==n){var u=A(r);i.left=Math.min(null!==(o=i.left)&&void 0!==o?o:1/0,u.left),i.top=Math.min(null!==(a=i.top)&&void 0!==a?a:1/0,u.top),i.right=Math.max(null!==(s=i.right)&&void 0!==s?s:-1/0,u.right),i.bottom=Math.max(null!==(l=i.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var q="Sortable"+(new Date).getTime();function H(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==C(t,"display")&&t!==zt.ghost){e.push({target:t,rect:A(t)});var n=r({},e[e.length-1].rect);if(t.thisAnimationDuration){var i=T(t,!0);i&&(n.top-=i.f,n.left-=i.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var i in e)if(e.hasOwnProperty(i)&&e[i]===t[n][i])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var i=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var r=!1,o=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,s=A(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,h=T(n,!0);h&&(s.top-=h.f,s.left-=h.e),n.toRect=s,n.thisAnimationDuration&&I(l,s)&&!I(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(e=function(t,e,n,i){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*i.animation}(c,l,u,i.options)),I(s,a)||(n.prevFromRect=a,n.prevToRect=s,e||(e=i.options.animation),i.animate(n,c,s,e)),e&&(r=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),r?t=setTimeout((function(){"function"==typeof n&&n()}),o):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,i){if(i){C(t,"transition",""),C(t,"transform","");var r=T(this.el),o=r&&r.a,a=r&&r.d,s=(e.left-n.left)/(o||1),l=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!l,C(t,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),C(t,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),C(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){C(t,"transition",""),C(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),i)}}}}var W=[],U={initializeByDefault:!0},V={mount:function(t){for(var e in U)U.hasOwnProperty(e)&&!(e in t)&&(t[e]=U[e]);W.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),W.push(t)},pluginEvent:function(t,e,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=t+"Global";W.forEach((function(i){e[i.pluginName]&&(e[i.pluginName][o]&&e[i.pluginName][o](r({sortable:e},n)),e.options[i.pluginName]&&e[i.pluginName][t]&&e[i.pluginName][t](r({sortable:e},n)))}))},initializePlugins:function(t,e,n,i){for(var r in W.forEach((function(i){var r=i.pluginName;if(t.options[r]||i.initializeByDefault){var o=new i(t,e,t.options);o.sortable=t,o.options=t.options,t[r]=o,s(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var o=this.modifyOption(t,r,t.options[r]);void 0!==o&&(t.options[r]=o)}},getEventProperties:function(t,e){var n={};return W.forEach((function(i){"function"==typeof i.eventProperties&&s(n,i.eventProperties.call(e[i.pluginName],t))})),n},modifyOption:function(t,e,n){var i;return W.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(i=r.optionListeners[e].call(t[r.pluginName],n))})),i}};function Z(t){var e=t.sortable,n=t.rootEl,i=t.name,o=t.targetEl,a=t.cloneEl,s=t.toEl,l=t.fromEl,u=t.oldIndex,d=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,m=t.originalEvent,g=t.putSortable,v=t.extraEventProperties;if(e=e||n&&n[q]){var y,b=e.options,_="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||c||h?(y=document.createEvent("Event")).initEvent(i,!0,!0):y=new CustomEvent(i,{bubbles:!0,cancelable:!0}),y.to=s||n,y.from=l||n,y.item=o||n,y.clone=a,y.oldIndex=u,y.newIndex=d,y.oldDraggableIndex=f,y.newDraggableIndex=p,y.originalEvent=m,y.pullMode=g?g.lastPutMode:void 0;var w=r(r({},v),V.getEventProperties(i,e));for(var x in w)y[x]=w[x];n&&n.dispatchEvent(y),b[_]&&b[_].call(e,y)}}var Y=["evt"],$=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,o=l(n,Y);V.pluginEvent.bind(zt)(t,e,r({dragEl:K,parentEl:X,ghostEl:J,rootEl:Q,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:it,dragStarted:gt,putSortable:ut,activeSortable:zt.active,originalEvent:i,oldIndex:rt,oldDraggableIndex:at,newIndex:ot,newDraggableIndex:st,hideGhostForTarget:It,unhideGhostForTarget:Rt,cloneNowHidden:function(){it=!0},cloneNowShown:function(){it=!1},dispatchSortableEvent:function(t){G({sortable:e,name:t,originalEvent:i})}},o))};function G(t){Z(r({putSortable:ut,cloneEl:nt,targetEl:K,rootEl:Q,oldIndex:rt,oldDraggableIndex:at,newIndex:ot,newDraggableIndex:st},t))}var K,X,J,Q,tt,et,nt,it,rt,ot,at,st,lt,ut,ct,ht,dt,ft,pt,mt,gt,vt,yt,bt,_t,wt=!1,xt=!1,kt=[],St=!1,Ct=!1,Tt=[],Ot=!1,Et=[],At="undefined"!=typeof document,Lt=p,Mt=h||c?"cssFloat":"float",Pt=At&&!m&&!p&&"draggable"in document.createElement("div"),Nt=function(){if(At){if(c)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Dt=function(t,e){var n=C(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=M(t,0,e),o=M(t,1,e),a=r&&C(r),s=o&&C(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(r).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=i&&"none"===n[Mt]||o&&"none"===n[Mt]&&l+u>i)?"vertical":"horizontal"},jt=function(t){function e(t,n){return function(i,r,o,a){var s=i.options.group.name&&r.options.group.name&&i.options.group.name===r.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(i,r,o,a),n)(i,r,o,a);var l=(n?i:r).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},i=t.group;i&&"object"==o(i)||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},It=function(){!Nt&&J&&C(J,"display","none")},Rt=function(){!Nt&&J&&C(J,"display","")};At&&!m&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var Ft=function(t){if(K){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,o=t.clientY,kt.some((function(t){var e=t[q].options.emptyInsertThreshold;if(e&&!P(t)){var n=A(t),i=r>=n.left-e&&r<=n.right+e,s=o>=n.top-e&&o<=n.bottom+e;return i&&s?a=t:void 0}})),a);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[q]._onDragOver(n)}}var r,o,a},Bt=function(t){K&&K.parentNode[q]._isOutsideThisEl(t.target)};function zt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=s({},e),t[q]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Dt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==zt.supportPointer&&"PointerEvent"in window&&!f,emptyInsertThreshold:5};for(var i in V.initializePlugins(this,t,n),n)!(i in e)&&(e[i]=n[i]);for(var r in jt(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),kt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),s(this,H())}function qt(t,e,n,i,r,o,a,s){var l,u,d=t[q],f=d.options.onMove;return!window.CustomEvent||c||h?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=i,l.related=r||e,l.relatedRect=o||A(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),f&&(u=f.call(d,l,a)),u}function Ht(t){t.draggable=!1}function Wt(){Ot=!1}function Ut(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,i=0;n--;)i+=e.charCodeAt(n);return i.toString(36)}function Vt(t){return setTimeout(t,0)}function Zt(t){return clearTimeout(t)}zt.prototype={constructor:zt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(vt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,K):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,i=this.options,r=i.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=i.filter;if(function(t){Et.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var i=e[n];i.checked&&Et.push(i)}}(n),!K&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!f||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=w(s,i.draggable,n,!1))&&s.animated||et===s)){if(rt=N(s),at=N(s,i.draggable),"function"==typeof u){if(u.call(this,t,s,this))return G({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),$("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(i){if(i=w(l,i.trim(),n,!1))return G({sortable:e,rootEl:i,name:"filter",targetEl:s,fromEl:n,toEl:n}),$("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());i.handle&&!w(l,i.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var i,r=this,o=r.el,a=r.options,s=o.ownerDocument;if(n&&!K&&n.parentNode===o){var l=A(n);if(Q=o,X=(K=n).parentNode,tt=K.nextSibling,et=n,lt=a.group,zt.dragged=K,ct={target:K,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=ct.clientX-l.left,mt=ct.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,K.style["will-change"]="all",i=function(){$("delayEnded",r,{evt:t}),zt.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!d&&r.nativeDraggable&&(K.draggable=!0),r._triggerDragStart(t,e),G({sortable:r,name:"choose",originalEvent:t}),S(K,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){O(K,t.trim(),Ht)})),v(s,"dragover",Ft),v(s,"mousemove",Ft),v(s,"touchmove",Ft),v(s,"mouseup",r._onDrop),v(s,"touchend",r._onDrop),v(s,"touchcancel",r._onDrop),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),$("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(h||c))i();else{if(zt.eventCanceled)return void this._onDrop();v(s,"mouseup",r._disableDelayedDrag),v(s,"touchend",r._disableDelayedDrag),v(s,"touchcancel",r._disableDelayedDrag),v(s,"mousemove",r._delayedDragTouchMoveHandler),v(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&v(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Ht(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._disableDelayedDrag),y(t,"touchend",this._disableDelayedDrag),y(t,"touchcancel",this._disableDelayedDrag),y(t,"mousemove",this._delayedDragTouchMoveHandler),y(t,"touchmove",this._delayedDragTouchMoveHandler),y(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v(K,"dragend",this),v(Q,"dragstart",this._onDragStart));try{document.selection?Vt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(wt=!1,Q&&K){$("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Bt);var n=this.options;!t&&S(K,n.dragClass,!1),S(K,n.ghostClass,!0),zt.active=this,t&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,It();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==e;)e=t;if(K.parentNode[q]._isOutsideThisEl(t),e)do{if(e[q]){if(e[q]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Rt()}},_onTouchMove:function(t){if(ct){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=J&&T(J,!0),a=J&&o&&o.a,s=J&&o&&o.d,l=Lt&&_t&&D(_t),u=(r.clientX-ct.clientX+i.x)/(a||1)+(l?l[0]-Tt[0]:0)/(a||1),c=(r.clientY-ct.clientY+i.y)/(s||1)+(l?l[1]-Tt[1]:0)/(s||1);if(!zt.active&&!wt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(J){o?(o.e+=u-(dt||0),o.f+=c-(ft||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");C(J,"webkitTransform",h),C(J,"mozTransform",h),C(J,"msTransform",h),C(J,"transform",h),dt=u,ft=c,ht=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!J){var t=this.options.fallbackOnBody?document.body:Q,e=A(K,!0,Lt,!0,t),n=this.options;if(Lt){for(_t=t;"static"===C(_t,"position")&&"none"===C(_t,"transform")&&_t!==document;)_t=_t.parentNode;_t!==document.body&&_t!==document.documentElement?(_t===document&&(_t=E()),e.top+=_t.scrollTop,e.left+=_t.scrollLeft):_t=E(),Tt=D(_t)}S(J=K.cloneNode(!0),n.ghostClass,!1),S(J,n.fallbackClass,!0),S(J,n.dragClass,!0),C(J,"transition",""),C(J,"transform",""),C(J,"box-sizing","border-box"),C(J,"margin",0),C(J,"top",e.top),C(J,"left",e.left),C(J,"width",e.width),C(J,"height",e.height),C(J,"opacity","0.8"),C(J,"position",Lt?"absolute":"fixed"),C(J,"zIndex","100000"),C(J,"pointerEvents","none"),zt.ghost=J,t.appendChild(J),C(J,"transform-origin",pt/parseInt(J.style.width)*100+"% "+mt/parseInt(J.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,i=t.dataTransfer,r=n.options;$("dragStart",this,{evt:t}),zt.eventCanceled?this._onDrop():($("setupClone",this),zt.eventCanceled||((nt=B(K)).removeAttribute("id"),nt.draggable=!1,nt.style["will-change"]="",this._hideClone(),S(nt,this.options.chosenClass,!1),zt.clone=nt),n.cloneId=Vt((function(){$("clone",n),zt.eventCanceled||(n.options.removeCloneOnHide||Q.insertBefore(nt,K),n._hideClone(),G({sortable:n,name:"clone"}))})),!e&&S(K,r.dragClass,!0),e?(xt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(n,i,K)),v(document,"drop",n),C(K,"transform","translateZ(0)")),wt=!0,n._dragStartId=Vt(n._dragStarted.bind(n,e,t)),v(document,"selectstart",n),gt=!0,f&&C(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,i,o,a=this.el,s=t.target,l=this.options,u=l.group,c=zt.active,h=lt===u,d=l.sort,f=ut||c,p=this,m=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=w(s,l.draggable,a,!0),B("dragOver"),zt.eventCanceled)return m;if(K.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return W(!1);if(xt=!1,c&&!l.disabled&&(h?d||(i=X!==Q):ut===this||(this.lastPutMode=lt.checkPull(this,c,K,t))&&u.checkPut(this,c,K,t))){if(o="vertical"===this._getDirection(t,s),e=A(K),B("dragOverValid"),zt.eventCanceled)return m;if(i)return X=Q,H(),this._hideClone(),B("revert"),zt.eventCanceled||(tt?Q.insertBefore(K,tt):Q.appendChild(K)),W(!0);var g=P(a,l.draggable);if(!g||function(t,e,n){var i=A(P(n.el,n.options.draggable)),r=z(n.el,n.options,J),o=10;return e?t.clientX>r.right+o||t.clientY>i.bottom&&t.clientX>i.left:t.clientY>r.bottom+o||t.clientX>i.right&&t.clientY>i.top}(t,o,this)&&!g.animated){if(g===K)return W(!1);if(g&&a===t.target&&(s=g),s&&(n=A(s)),!1!==qt(Q,a,K,e,s,n,t,!!s))return H(),g&&g.nextSibling?a.insertBefore(K,g.nextSibling):a.appendChild(K),X=a,U(),W(!0)}else if(g&&function(t,e,n){var i=A(M(n.el,0,n.options,!0)),r=z(n.el,n.options,J),o=10;return e?t.clientX<r.left-o||t.clientY<i.top&&t.clientX<i.right:t.clientY<r.top-o||t.clientY<i.bottom&&t.clientX<i.left}(t,o,this)){var v=M(a,0,l,!0);if(v===K)return W(!1);if(n=A(s=v),!1!==qt(Q,a,K,e,s,n,t,!1))return H(),a.insertBefore(K,v),X=a,U(),W(!0)}else if(s.parentNode===a){n=A(s);var y,b,_,x=K.parentNode!==a,k=!function(t,e,n){var i=n?t.left:t.top,r=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height;return i===a||r===s||i+o/2===a+l/2}(K.animated&&K.toRect||e,s.animated&&s.toRect||n,o),T=o?"top":"left",O=L(s,"top","top")||L(K,"top","top"),E=O?O.scrollTop:void 0;if(vt!==s&&(b=n[T],St=!1,Ct=!k&&l.invertSwap||x),y=function(t,e,n,i,r,o,a,s){var l=i?t.clientY:t.clientX,u=i?n.height:n.width,c=i?n.top:n.left,h=i?n.bottom:n.right,d=!1;if(!a)if(s&&bt<u*r){if(!St&&(1===yt?l>c+u*o/2:l<h-u*o/2)&&(St=!0),St)d=!0;else if(1===yt?l<c+bt:l>h-bt)return-yt}else if(l>c+u*(1-r)/2&&l<h-u*(1-r)/2)return function(t){return N(K)<N(t)?1:-1}(e);if((d=d||a)&&(l<c+u*o/2||l>h-u*o/2))return l>c+u/2?1:-1;return 0}(t,s,n,o,k?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ct,vt===s),0!==y){var D=N(K);do{D-=y,_=X.children[D]}while(_&&("none"===C(_,"display")||_===J))}if(0===y||_===s)return W(!1);vt=s,yt=y;var j=s.nextElementSibling,I=!1,R=qt(Q,a,K,e,s,n,t,I=1===y);if(!1!==R)return 1!==R&&-1!==R||(I=1===R),Ot=!0,setTimeout(Wt,30),H(),I&&!j?a.appendChild(K):s.parentNode.insertBefore(K,I?j:s),O&&F(O,0,E-O.scrollTop),X=K.parentNode,void 0===b||Ct||(bt=Math.abs(b-A(s)[T])),U(),W(!0)}if(a.contains(K))return W(!1)}return!1}function B(l,u){$(l,p,r({evt:t,isOwner:h,axis:o?"vertical":"horizontal",revert:i,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:s,completed:W,onMove:function(n,i){return qt(Q,a,K,e,n,A(n),t,i)},changed:U},u))}function H(){B("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function W(e){return B("dragOverCompleted",{insertion:e}),e&&(h?c._hideClone():c._showClone(p),p!==f&&(S(K,ut?ut.options.ghostClass:c.options.ghostClass,!1),S(K,l.ghostClass,!0)),ut!==p&&p!==zt.active?ut=p:p===zt.active&&ut&&(ut=null),f===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){B("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(s===K&&!K.animated||s===a&&!s.animated)&&(vt=null),l.dragoverBubble||t.rootEl||s===document||(K.parentNode[q]._isOutsideThisEl(t.target),!e&&Ft(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function U(){ot=N(K),st=N(K,l.draggable),G({sortable:p,name:"change",toEl:a,newIndex:ot,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Ft),y(document,"mousemove",Ft),y(document,"touchmove",Ft)},_offUpEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._onDrop),y(t,"touchend",this._onDrop),y(t,"pointerup",this._onDrop),y(t,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ot=N(K),st=N(K,n.draggable),$("drop",this,{evt:t}),X=K&&K.parentNode,ot=N(K),st=N(K,n.draggable),zt.eventCanceled||(wt=!1,Ct=!1,St=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zt(this.cloneId),Zt(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&C(document.body,"user-select",""),C(K,"transform",""),t&&(gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(Q===X||ut&&"clone"!==ut.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),K&&(this.nativeDraggable&&y(K,"dragend",this),Ht(K),K.style["will-change"]="",gt&&!wt&&S(K,ut?ut.options.ghostClass:this.options.ghostClass,!1),S(K,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:X,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==X?(ot>=0&&(G({rootEl:X,name:"add",toEl:X,fromEl:Q,originalEvent:t}),G({sortable:this,name:"remove",toEl:X,originalEvent:t}),G({rootEl:X,name:"sort",toEl:X,fromEl:Q,originalEvent:t}),G({sortable:this,name:"sort",toEl:X,originalEvent:t})),ut&&ut.save()):ot!==rt&&ot>=0&&(G({sortable:this,name:"update",toEl:X,originalEvent:t}),G({sortable:this,name:"sort",toEl:X,originalEvent:t})),zt.active&&(null!=ot&&-1!==ot||(ot=rt,st=at),G({sortable:this,name:"end",toEl:X,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){$("nulling",this),Q=K=X=J=tt=nt=et=it=ct=ht=gt=ot=st=rt=at=vt=yt=ut=lt=zt.dragged=zt.ghost=zt.clone=zt.active=null,Et.forEach((function(t){t.checked=!0})),Et.length=dt=ft=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":K&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,i=0,r=n.length,o=this.options;i<r;i++)w(t=n[i],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Ut(t));return e},sort:function(t,e){var n={},i=this.el;this.toArray().forEach((function(t,e){var r=i.children[e];w(r,this.options.draggable,i,!1)&&(n[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(i.removeChild(n[t]),i.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return w(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var i=V.modifyOption(this,t,e);n[t]=void 0!==i?i:e,"group"===t&&jt(n)},destroy:function(){$("destroy",this);var t=this.el;t[q]=null,y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart),y(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),kt.splice(kt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!it){if($("hideClone",this),zt.eventCanceled)return;C(nt,"display","none"),this.options.removeCloneOnHide&&nt.parentNode&&nt.parentNode.removeChild(nt),it=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(it){if($("showClone",this),zt.eventCanceled)return;K.parentNode!=Q||this.options.group.revertClone?tt?Q.insertBefore(nt,tt):Q.appendChild(nt):Q.insertBefore(nt,K),this.options.group.revertClone&&this.animate(K,nt),C(nt,"display",""),it=!1}}else this._hideClone()}},At&&v(document,"touchmove",(function(t){(zt.active||wt)&&t.cancelable&&t.preventDefault()})),zt.utils={on:v,off:y,css:C,find:O,is:function(t,e){return!!w(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:R,closest:w,toggleClass:S,clone:B,index:N,nextTick:Vt,cancelNextTick:Zt,detectDirection:Dt,getChild:M},zt.get=function(t){return t[q]},zt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(zt.utils=r(r({},zt.utils),t.utils)),V.mount(t)}))},zt.create=function(t,e){return new zt(t,e)},zt.version="1.15.2";var Yt,$t,Gt,Kt,Xt,Jt,Qt=[],te=!1;function ee(){Qt.forEach((function(t){clearInterval(t.pid)})),Qt=[]}function ne(){clearInterval(Jt)}var ie=R((function(t,e,n,i){if(e.scroll){var r,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=E(),c=!1;$t!==n&&($t=n,ee(),Yt=e.scroll,r=e.scrollFn,!0===Yt&&(Yt=j(n,!0)));var h=0,d=Yt;do{var f=d,p=A(f),m=p.top,g=p.bottom,v=p.left,y=p.right,b=p.width,_=p.height,w=void 0,x=void 0,k=f.scrollWidth,S=f.scrollHeight,T=C(f),O=f.scrollLeft,L=f.scrollTop;f===u?(w=b<k&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),x=_<S&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(w=b<k&&("auto"===T.overflowX||"scroll"===T.overflowX),x=_<S&&("auto"===T.overflowY||"scroll"===T.overflowY));var M=w&&(Math.abs(y-o)<=s&&O+b<k)-(Math.abs(v-o)<=s&&!!O),P=x&&(Math.abs(g-a)<=s&&L+_<S)-(Math.abs(m-a)<=s&&!!L);if(!Qt[h])for(var N=0;N<=h;N++)Qt[N]||(Qt[N]={});Qt[h].vx==M&&Qt[h].vy==P&&Qt[h].el===f||(Qt[h].el=f,Qt[h].vx=M,Qt[h].vy=P,clearInterval(Qt[h].pid),0==M&&0==P||(c=!0,Qt[h].pid=setInterval(function(){i&&0===this.layer&&zt.active._onTouchMove(Xt);var e=Qt[this.layer].vy?Qt[this.layer].vy*l:0,n=Qt[this.layer].vx?Qt[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(zt.dragged.parentNode[q],n,e,t,Xt,Qt[this.layer].el)||F(Qt[this.layer].el,n,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&d!==u&&(d=j(d,!1)));te=c}}),30),re=function(t){var e=t.originalEvent,n=t.putSortable,i=t.dragEl,r=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var l=n||r;a();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);s(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function oe(){}function ae(){}oe.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=M(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(e,i):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:re},s(oe,{pluginName:"revertOnSpill"}),ae.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:re},s(ae,{pluginName:"removeOnSpill"});zt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):e.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),ne(),ee(),clearTimeout(x),x=void 0},nulling:function(){Xt=$t=Yt=te=Jt=Gt=Kt=null,Qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,i=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(i,r);if(Xt=t,e||this.options.forceAutoScrollFallback||h||c||f){ie(t,this.options,o,e);var a=j(o,!0);!te||Jt&&i===Gt&&r===Kt||(Jt&&ne(),Jt=setInterval((function(){var o=j(document.elementFromPoint(i,r),!0);o!==a&&(a=o,ee()),ie(t,n.options,o,e)}),10),Gt=i,Kt=r)}else{if(!this.options.bubbleScroll||j(o,!0)===E())return void ee();ie(t,this.options,j(o,!1),!1)}}},s(t,{pluginName:"scroll",initializeByDefault:!0})}),zt.mount(ae,oe);const se=zt},7371:function(t){t.exports=function(){"use strict";function t(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class e{constructor(){this._events=void 0,this._events={}}on(e,n){t(e,(t=>{const e=this._events[t]||[];e.push(n),this._events[t]=e}))}off(e,n){var i=arguments.length;0!==i?t(e,(t=>{if(1===i)return void delete this._events[t];const e=this._events[t];void 0!==e&&(e.splice(e.indexOf(n),1),this._events[t]=e)})):this._events={}}trigger(e,...n){var i=this;t(e,(t=>{const e=i._events[t];void 0!==e&&e.forEach((t=>{t.apply(i,n)}))}))}}function n(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,n){t.plugins[e]={name:e,fn:n}}initializePlugins(t){var e,n;const i=this,r=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?r.push(t):(i.plugins.settings[t.name]=t.options,r.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(i.plugins.settings[e]=t[e],r.push(e));for(;n=r.shift();)i.require(n)}loadPlugin(e){var n=this,i=n.plugins,r=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=r.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)}require(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]}}}const i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==l(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",r=t=>{if(!a(t))return t.join("");let e="",n=0;const i=()=>{n>1&&(e+="{"+n+"}")};return t.forEach(((r,o)=>{r!==t[o-1]?(i(),e+=r,n=1):n++})),i(),e},o=t=>{let e=c(t);return i(e)},a=t=>new Set(t).size!==t.length,s=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),l=t=>t.reduce(((t,e)=>Math.max(t,u(e))),0),u=t=>c(t).length,c=t=>Array.from(t),h=t=>{if(1===t.length)return[[t]];let e=[];const n=t.substring(1);return h(n).forEach((function(n){let i=n.slice(0);i[0]=t.charAt(0)+i[0],e.push(i),i=n.slice(0),i.unshift(t.charAt(0)),e.push(i)})),e},d=[[0,65535]],f="[̀-ͯ·ʾʼ]";let p,m;const g=3,v={},y={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in y){let e=y[t]||"";for(let n=0;n<e.length;n++){let i=e.substring(n,n+1);v[i]=t}}const b=new RegExp(Object.keys(v).join("|")+"|"+f,"gu"),_=t=>{void 0===p&&(p=T(t||d))},w=(t,e="NFKD")=>t.normalize(e),x=t=>c(t).reduce(((t,e)=>t+k(e)),""),k=t=>(t=w(t).toLowerCase().replace(b,(t=>v[t]||"")),w(t,"NFC"));function*S(t){for(const[e,n]of t)for(let t=e;t<=n;t++){let e=String.fromCharCode(t),n=x(e);n!=e.toLowerCase()&&(n.length>g||0!=n.length&&(yield{folded:n,composed:e,code_point:t}))}}const C=t=>{const e={},n=(t,n)=>{const i=e[t]||new Set,r=new RegExp("^"+o(i)+"$","iu");n.match(r)||(i.add(s(n)),e[t]=i)};for(let e of S(t))n(e.folded,e.folded),n(e.folded,e.composed);return e},T=t=>{const e=C(t),n={};let r=[];for(let t in e){let i=e[t];i&&(n[t]=o(i)),t.length>1&&r.push(s(t))}r.sort(((t,e)=>e.length-t.length));const a=i(r);return m=new RegExp("^"+a,"u"),n},O=(t,e=1)=>{let n=0;return t=t.map((t=>(p[t]&&(n+=t.length),p[t]||t))),n>=e?r(t):""},E=(t,e=1)=>(e=Math.max(e,t.length-1),i(h(t).map((t=>O(t,e))))),A=(t,e=!0)=>{let n=t.length>1?1:0;return i(t.map((t=>{let i=[];const o=e?t.length():t.length()-1;for(let e=0;e<o;e++)i.push(E(t.substrs[e]||"",n));return r(i)})))},L=(t,e)=>{for(const n of e){if(n.start!=t.start||n.end!=t.end)continue;if(n.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const i=t=>{for(const n of e){if(n.start===t.start&&n.substr===t.substr)return!1;if(1!=t.length&&1!=n.length){if(t.start<n.start&&t.end>n.start)return!0;if(n.start<t.start&&n.end>t.start)return!0}}return!1};if(!(n.parts.filter(i).length>0))return!0}return!1};class M{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let n=new M,i=JSON.parse(JSON.stringify(this.parts)),r=i.pop();for(const t of i)n.add(t);let o=e.substr.substring(0,t-r.start),a=o.length;return n.add({start:r.start,end:r.start+a,length:a,substr:o}),n}}const P=t=>{_(),t=x(t);let e="",n=[new M];for(let i=0;i<t.length;i++){let r=t.substring(i).match(m);const o=t.substring(i,i+1),a=r?r[0]:null;let s=[],l=new Set;for(const t of n){const e=t.last();if(!e||1==e.length||e.end<=i)if(a){const e=a.length;t.add({start:i,end:i+e,length:e,substr:a}),l.add("1")}else t.add({start:i,end:i+1,length:1,substr:o}),l.add("2");else if(a){let n=t.clone(i,e);const r=a.length;n.add({start:i,end:i+r,length:r,substr:a}),s.push(n)}else l.add("3")}if(s.length>0){s=s.sort(((t,e)=>t.length()-e.length()));for(let t of s)L(t,n)||n.push(t)}else if(i>0&&1==l.size&&!l.has("3")){e+=A(n,!1);let t=new M;const i=n[0];i&&t.add(i.last()),n=[t]}}return e+=A(n,!0),e},N=(t,e)=>{if(t)return t[e]},D=(t,e)=>{if(t){for(var n,i=e.split(".");(n=i.shift())&&(t=t[n]););return t}},j=(t,e,n)=>{var i,r;return t?(t+="",null==e.regex||-1===(r=t.search(e.regex))?0:(i=e.string.length/t.length,0===r&&(i+=.5),i*n)):0},I=(t,e)=>{var n=t[e];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(t[e]=[n])},R=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},F=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t<e?-1:0:(t=x(t+"").toLowerCase())>(e=x(e+"").toLowerCase())?1:e>t?-1:0;class B{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,n){if(!t||!t.length)return[];const i=[],r=t.split(/\s+/);var o;return n&&(o=new RegExp("^("+Object.keys(n).map(s).join("|")+"):(.*)$")),r.forEach((t=>{let n,r=null,a=null;o&&(n=t.match(o))&&(r=n[1],t=n[2]),t.length>0&&(a=this.settings.diacritics?P(t)||null:s(t),a&&e&&(a="\\b"+a)),i.push({string:t,regex:a?new RegExp(a,"iu"):null,field:r})})),i}getScoreFunction(t,e){var n=this.prepareSearch(t,e);return this._getScoreFunction(n)}_getScoreFunction(t){const e=t.tokens,n=e.length;if(!n)return function(){return 0};const i=t.options.fields,r=t.weights,o=i.length,a=t.getAttrFn;if(!o)return function(){return 1};const s=1===o?function(t,e){const n=i[0].field;return j(a(e,n),t,r[n]||1)}:function(t,e){var n=0;if(t.field){const i=a(e,t.field);!t.regex&&i?n+=1/o:n+=j(i,t,1)}else R(r,((i,r)=>{n+=j(a(e,r),t,i)}));return n/o};return 1===n?function(t){return s(e[0],t)}:"and"===t.options.conjunction?function(t){var i,r=0;for(let n of e){if((i=s(n,t))<=0)return 0;r+=i}return r/n}:function(t){var i=0;return R(e,(e=>{i+=s(e,t)})),i/n}}getSortFunction(t,e){var n=this.prepareSearch(t,e);return this._getSortFunction(n)}_getSortFunction(t){var e,n=[];const i=this,r=t.options,o=!t.query&&r.sort_empty?r.sort_empty:r.sort;if("function"==typeof o)return o.bind(this);const a=function(e,n){return"$score"===e?n.score:t.getAttrFn(i.items[n.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&n.push(e);if(t.query){e=!0;for(let t of n)if("$score"===t.field){e=!1;break}e&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter((t=>"$score"!==t.field));return n.length?function(t,e){var i,r;for(let o of n)if(r=o.field,i=("desc"===o.direction?-1:1)*F(a(r,t),a(r,e)))return i;return 0}:null}prepareSearch(t,e){const n={};var i=Object.assign({},e);if(I(i,"sort"),I(i,"sort_empty"),i.fields){I(i,"fields");const t=[];i.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),n[e.field]="weight"in e?e.weight:1})),i.fields=t}return{options:i,query:t.toLowerCase().trim(),tokens:this.tokenize(t,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?D:N}}search(t,e){var n,i,r=this;i=this.prepareSearch(t,e),e=i.options,t=i.query;const o=e.score||r._getScoreFunction(i);t.length?R(r.items,((t,r)=>{n=o(t),(!1===e.filter||n>0)&&i.items.push({score:n,id:r})})):R(r.items,((t,e)=>{i.items.push({score:1,id:e})}));const a=r._getSortFunction(i);return a&&i.items.sort(a),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i}}const z=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},q=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(H(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},H=t=>"string"==typeof t&&t.indexOf("<")>-1,W=t=>t.replace(/['"\\]/g,"\\$&"),U=(t,e)=>{var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!1),t.dispatchEvent(n)},V=(t,e)=>{Object.assign(t.style,e)},Z=(t,...e)=>{var n=$(e);(t=G(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))},Y=(t,...e)=>{var n=$(e);(t=G(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))},$=t=>{var e=[];return z(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},G=t=>(Array.isArray(t)||(t=[t]),t),K=(t,e,n)=>{if(!n||n.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},X=(t,e=0)=>e>0?t[t.length-1]:t[0],J=t=>0===Object.keys(t).length,Q=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n},tt=(t,e)=>{z(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))},et=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},nt=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const n=t=>{var n=t.data.match(e);if(n&&t.data.length>0){var i=document.createElement("span");i.className="highlight";var r=t.splitText(n.index);r.splitText(n[0].length);var o=r.cloneNode(!0);return i.appendChild(o),et(r,i),1}return 0},i=t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{r(t)}))},r=t=>3===t.nodeType?n(t):(i(t),0);r(t)},it=t=>{var e=t.querySelectorAll("span.highlight");Array.prototype.forEach.call(e,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()}))},rt=65,ot=13,at=27,st=37,lt=38,ut=39,ct=40,ht=8,dt=46,ft=9,pt="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var mt={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const gt=t=>null==t?null:vt(t),vt=t=>"boolean"==typeof t?t?"1":"0":t+"",yt=t=>(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),bt=(t,e)=>e>0?setTimeout(t,e):(t.call(null),null),_t=(t,e)=>{var n;return function(i,r){var o=this;n&&(o.loading=Math.max(o.loading-1,0),clearTimeout(n)),n=setTimeout((function(){n=null,o.loadedSearches[i]=!0,t.call(o,i,r)}),e)}},wt=(t,e,n)=>{var i,r=t.trigger,o={};for(i of(t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return r.apply(t,arguments);o[n]=arguments},n.apply(t,[]),t.trigger=r,e))i in o&&r.apply(t,o[i])},xt=t=>({start:t.selectionStart||0,length:(t.selectionEnd||0)-(t.selectionStart||0)}),kt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},St=(t,e,n,i)=>{t.addEventListener(e,n,i)},Ct=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),Tt=(t,e)=>{const n=t.getAttribute("id");return n||(t.setAttribute("id",e),e)},Ot=t=>t.replace(/[\\"']/g,"\\$&"),Et=(t,e)=>{e&&t.append(e)};function At(t,e){var n=Object.assign({},mt,e),i=n.dataAttr,r=n.labelField,o=n.valueField,a=n.disabledField,s=n.optgroupField,l=n.optgroupLabelField,u=n.optgroupValueField,c=t.tagName.toLowerCase(),h=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!h&&!n.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(h=e.textContent)}var d={placeholder:h,options:[],optgroups:[],items:[],maxItems:null},f=()=>{const e=t.getAttribute(i);if(e)d.options=JSON.parse(e),z(d.options,(t=>{d.items.push(t[o])}));else{var a=t.value.trim()||"";if(!n.allowEmptyOption&&!a.length)return;const e=a.split(n.delimiter);z(e,(t=>{const e={};e[r]=t,e[o]=t,d.options.push(e)})),d.items=e}};return"select"===c?(()=>{var e,c=d.options,h={},f=1;let p=0;var m=t=>{var e=Object.assign({},t.dataset),n=i&&e[i];return"string"==typeof n&&n.length&&(e=Object.assign(e,JSON.parse(n))),e},g=(t,e)=>{var i=gt(t.value);if(null!=i&&(i||n.allowEmptyOption)){if(h.hasOwnProperty(i)){if(e){var l=h[i][s];l?Array.isArray(l)?l.push(e):h[i][s]=[l,e]:h[i][s]=e}}else{var u=m(t);u[r]=u[r]||t.textContent,u[o]=u[o]||i,u[a]=u[a]||t.disabled,u[s]=u[s]||e,u.$option=t,u.$order=u.$order||++p,h[i]=u,c.push(u)}t.selected&&d.items.push(i)}},v=t=>{var e,n;(n=m(t))[l]=n[l]||t.getAttribute("label")||"",n[u]=n[u]||f++,n[a]=n[a]||t.disabled,n.$order=n.$order||++p,d.optgroups.push(n),e=n[u],z(t.children,(t=>{g(t,e)}))};d.maxItems=t.hasAttribute("multiple")?null:1,z(t.children,(t=>{"optgroup"===(e=t.tagName.toLowerCase())?v(t):"option"===e&&g(t)}))})():f(),Object.assign({},mt,d,e)}var Lt=0;class Mt extends(n(e)){constructor(t,e){var n;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,Lt++;var i=q(t);if(i.tomselect)throw new Error("Tom Select already initialized on this element");i.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(i,null)).getPropertyValue("direction");const r=At(i,e);this.settings=r,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=Tt(i,"tomselect-"+Lt),this.isRequired=i.required,this.sifter=new B(this.options,{diacritics:r.diacritics}),r.mode=r.mode||(1===r.maxItems?"single":"multi"),"boolean"!=typeof r.hideSelected&&(r.hideSelected="multi"===r.mode),"boolean"!=typeof r.hidePlaceholder&&(r.hidePlaceholder="multi"!==r.mode);var o=r.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?r.createFilter=t=>o.test(t):r.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(r.plugins),this.setupCallbacks(),this.setupTemplates();const a=q("<div>"),s=q("<div>"),l=this._render("dropdown"),u=q('<div role="listbox" tabindex="-1">'),c=this.input.getAttribute("class")||"",h=r.mode;var d;Z(a,r.wrapperClass,c,h),Z(s,r.controlClass),Et(a,s),Z(l,r.dropdownClass,h),r.copyClassesToDropdown&&Z(l,c),Z(u,r.dropdownContentClass),Et(l,u),q(r.dropdownParent||a).appendChild(l),H(r.controlInput)?(d=q(r.controlInput),R(["autocorrect","autocapitalize","autocomplete","spellcheck"],(t=>{i.getAttribute(t)&&tt(d,{[t]:i.getAttribute(t)})})),d.tabIndex=-1,s.appendChild(d),this.focus_node=d):r.controlInput?(d=q(r.controlInput),this.focus_node=d):(d=q("<input/>"),this.focus_node=s),this.wrapper=a,this.dropdown=l,this.dropdown_content=u,this.control=s,this.control_input=d,this.setup()}setup(){const t=this,e=t.settings,n=t.control_input,i=t.dropdown,r=t.dropdown_content,o=t.wrapper,a=t.control,l=t.input,u=t.focus_node,c={passive:!0},h=t.inputId+"-ts-dropdown";tt(r,{id:h}),tt(u,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":h});const d=Tt(u,t.inputId+"-ts-control"),f="label[for='"+W(t.inputId)+"']",p=document.querySelector(f),m=t.focus.bind(t);if(p){St(p,"click",m),tt(p,{for:d});const e=Tt(p,t.inputId+"-ts-label");tt(u,{"aria-labelledby":e}),tt(r,{"aria-labelledby":e})}if(o.style.width=l.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");Z([o,i],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&tt(l,{multiple:"multiple"}),e.placeholder&&tt(n,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+s(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=_t(e.load,e.loadThrottle)),St(i,"mousemove",(()=>{t.ignoreHover=!1})),St(i,"mouseenter",(e=>{var n=K(e.target,"[data-selectable]",i);n&&t.onOptionHover(e,n)}),{capture:!0}),St(i,"click",(e=>{const n=K(e.target,"[data-selectable]");n&&(t.onOptionSelect(e,n),kt(e,!0))})),St(a,"click",(e=>{var i=K(e.target,"[data-ts-item]",a);i&&t.onItemSelect(e,i)?kt(e,!0):""==n.value&&(t.onClick(),kt(e,!0))})),St(u,"keydown",(e=>t.onKeyDown(e))),St(n,"keypress",(e=>t.onKeyPress(e))),St(n,"input",(e=>t.onInput(e))),St(u,"blur",(e=>t.onBlur(e))),St(u,"focus",(e=>t.onFocus(e))),St(n,"paste",(e=>t.onPaste(e)));const g=e=>{const r=e.composedPath()[0];if(!o.contains(r)&&!i.contains(r))return t.isFocused&&t.blur(),void t.inputState();r==n&&t.isOpen?e.stopPropagation():kt(e,!0)},v=()=>{t.isOpen&&t.positionDropdown()};St(document,"mousedown",g),St(window,"scroll",v,c),St(window,"resize",v,c),this._destroy=()=>{document.removeEventListener("mousedown",g),window.removeEventListener("scroll",v),window.removeEventListener("resize",v),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,St(l,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,l.disabled?t.disable():l.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),Z(l,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),R(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,i={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'<div class="optgroup-header">'+e(t[n])+"</div>",option:(t,n)=>"<div>"+n(t[e])+"</div>",item:(t,n)=>"<div>"+n(t[e])+"</div>",option_create:(t,e)=>'<div class="create">Add <strong>'+e(t.input)+"</strong>&hellip;</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};t.settings.render=Object.assign({},i,t.settings.render)}setupCallbacks(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)(e=this.settings[n[t]])&&this.on(t,e)}sync(t=!0){const e=this,n=t?At(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(n.options,n.optgroups),e.setValue(n.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){U(this.input,"input"),U(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?kt(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);R(n,(t=>{gt(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void kt(t)):void 0}kt(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)t.keyCode!==ft&&kt(t);else{switch(t.keyCode){case rt:if(Ct(pt,t)&&""==e.control_input.value)return kt(t),void e.selectAll();break;case at:return e.isOpen&&(kt(t,!0),e.close()),void e.clearActiveItems();case ct:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void kt(t);case lt:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void kt(t);case ot:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),kt(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&kt(t));case st:return void e.advanceSelection(-1,t);case ut:return void e.advanceSelection(1,t);case ft:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),kt(t)),e.settings.create&&e.createItem()&&kt(t)));case ht:case dt:return void e.deleteSelection(t)}e.isInputHidden&&!Ct(pt,t)&&kt(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&clearTimeout(this.refreshTimeout),this.refreshTimeout=bt((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void kt(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),n||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var n=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,n):n()}}}onOptionSelect(t,e){var n,i=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?i.createItem(null,(()=>{i.settings.closeAfterSelect&&i.close()})):void 0!==(n=e.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect&&i.close(),!i.settings.hideSelected&&t.type&&/click/.test(t.type)&&i.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(kt(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;Z(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||Y(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,U(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){wt(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,i,r,o,a,s,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=e&&e.type.toLowerCase())&&Ct("shiftKey",e)&&l.activeItems.length){for(s=l.getLastActive(),(r=Array.prototype.indexOf.call(l.control.children,s))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(a=r,r=o,o=a),i=r;i<=o;i++)t=l.control.children[i],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);kt(e)}else"click"===n&&Ct(pt,e)||"keydown"===n&&Ct("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&Y(n,"last-active"),Z(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),Y(t,"active")}clearActiveItems(){Y(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,tt(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),tt(t,{"aria-selected":"true"}),Z(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,i=n.clientHeight,r=n.scrollTop||0,o=t.offsetHeight,a=t.getBoundingClientRect().top-n.getBoundingClientRect().top+r;a+o>i+r?this.scroll(a-i+o,e):a<r&&this.scroll(a,e)}scroll(t,e){const n=this.dropdown_content;e&&(n.style.scrollBehavior=e),n.scrollTop=t,n.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(Y(this.activeOption,"active"),tt(this.activeOption,{"aria-selected":null})),this.activeOption=null,tt(this.focus_node,{"aria-activedescendant":null})}selectAll(){const t=this;if("single"===t.settings.mode)return;const e=t.controlChildren();e.length&&(t.inputState(),t.close(),t.activeItems=e,R(e,(e=>{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&(tt(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&tt(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,i=this,r=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==i.lastQuery?(i.lastQuery=t,e=i.sifter.search(t,Object.assign(r,{score:n})),i.currentResults=e):e=Object.assign({},i.currentResults),i.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=gt(t.id);return!(e&&-1!==i.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,n,i,r,o,a,s,l,u,c;const h={},d=[];var f=this,p=f.inputValue();const m=p===f.lastQuery||""==p&&null==f.lastQuery;var g=f.search(p),v=null,y=f.settings.shouldOpen||!1,b=f.dropdown_content;m&&(v=f.activeOption)&&(u=v.closest("[data-group]")),r=g.items.length,"number"==typeof f.settings.maxOptions&&(r=Math.min(r,f.settings.maxOptions)),r>0&&(y=!0);const _=(t,e)=>{let n=h[t];if(void 0!==n){let t=d[n];if(void 0!==t)return[n,t.fragment]}let i=document.createDocumentFragment();return n=d.length,d.push({fragment:i,order:e,optgroup:t}),[n,i]};for(e=0;e<r;e++){let t=g.items[e];if(!t)continue;let r=t.id,s=f.options[r];if(void 0===s)continue;let l=vt(r),c=f.getOption(l,!0);for(f.settings.hideSelected||c.classList.toggle("selected",f.items.includes(l)),o=s[f.settings.optgroupField]||"",n=0,i=(a=Array.isArray(o)?o:[o])&&a.length;n<i;n++){o=a[n];let t=s.$order,e=f.optgroups[o];void 0===e?o="":t=e.$order;const[i,l]=_(o,t);n>0&&(c=c.cloneNode(!0),tt(c,{id:s.$id+"-clone-"+n,"aria-selected":null}),c.classList.add("ts-cloned"),Y(c,"active"),f.activeOption&&f.activeOption.dataset.value==r&&u&&u.dataset.group===o.toString()&&(v=c)),l.appendChild(c),""!=o&&(h[o]=i)}}f.settings.lockOptgroupOrder&&d.sort(((t,e)=>t.order-e.order)),s=document.createDocumentFragment(),R(d,(t=>{let e=t.fragment,n=t.optgroup;if(!e||!e.children.length)return;let i=f.optgroups[n];if(void 0!==i){let t=document.createDocumentFragment(),n=f.render("optgroup_header",i);Et(t,n),Et(t,e);let r=f.render("optgroup",{group:i,options:t});Et(s,r)}else Et(s,e)})),b.innerHTML="",Et(b,s),f.settings.highlight&&(it(b),g.query.length&&g.tokens.length&&R(g.tokens,(t=>{nt(b,t.regex)})));var w=t=>{let e=f.render(t,{input:p});return e&&(y=!0,b.insertBefore(e,b.firstChild)),e};if(f.loading?w("loading"):f.settings.shouldLoad.call(f,p)?0===g.items.length&&w("no_results"):w("not_loading"),(l=f.canCreate(p))&&(c=w("option_create")),f.hasOptions=g.items.length>0||l,y){if(g.items.length>0){if(v||"single"!==f.settings.mode||null==f.items[0]||(v=f.getOption(f.items[0])),!b.contains(v)){let t=0;c&&!f.settings.addPrecedence&&(t=1),v=f.selectable()[t]}}else c&&(v=c);t&&!f.isOpen&&(f.open(),f.scrollToOption(v,"auto")),f.setActiveOption(v)}else f.clearActiveOption(),t&&f.isOpen&&f.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const n=this;if(Array.isArray(t))return n.addOptions(t,e),!1;const i=gt(t[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(t.$order=t.$order||++n.order,t.$id=n.inputId+"-opt-"+t.$order,n.options[i]=t,n.lastQuery=null,e&&(n.userOptions[i]=e,n.trigger("option_add",i,t)),i)}addOptions(t,e=!1){R(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=gt(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var i,r;const o=gt(t),a=gt(e[n.settings.valueField]);if(null===o)return;const s=n.options[o];if(null==s)return;if("string"!=typeof a)throw new Error("Value must be set in option data");const l=n.getOption(o),u=n.getItem(o);if(e.$order=e.$order||s.$order,delete n.options[o],n.uncacheValue(a),n.options[a]=e,l){if(n.dropdown_content.contains(l)){const t=n._render("option",e);et(l,t),n.activeOption===l&&n.setActiveOption(t)}l.remove()}u&&(-1!==(r=n.items.indexOf(o))&&n.items.splice(r,1,a),i=n._render("item",e),u.classList.contains("active")&&Z(i,"active"),et(u,i)),n.lastQuery=null}removeOption(t,e){const n=this;t=vt(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};R(this.options,((t,i)=>{e(t,i)&&(n[i]=t)})),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const n=gt(t);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(e)return this._render("option",i)}return null}getAdjacent(t,e,n="option"){var i,r=this;if(!t)return null;i="item"==n?r.controlChildren():r.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n<i.length;n++)if(i[n]==t)return e>0?i[n+1]:i[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=gt(t);return null!==e?this.control.querySelector(`[data-value="${Ot(e)}"]`):null}addItems(t,e){var n=this,i=Array.isArray(t)?t:[t];const r=(i=i.filter((t=>-1===n.items.indexOf(t))))[i.length-1];i.forEach((t=>{n.isPending=t!==r,n.addItem(t,e)}))}addItem(t,e){wt(this,e?[]:["change","dropdown_close"],(()=>{var n,i;const r=this,o=r.settings.mode,a=gt(t);if((!a||-1===r.items.indexOf(a)||("single"===o&&r.close(),"single"!==o&&r.settings.duplicates))&&null!==a&&r.options.hasOwnProperty(a)&&("single"===o&&r.clear(e),"multi"!==o||!r.isFull())){if(n=r._render("item",r.options[a]),r.control.contains(n)&&(n=n.cloneNode(!0)),i=r.isFull(),r.items.splice(r.caretPos,0,a),r.insertAtCaret(n),r.isSetup){if(!r.isPending&&r.settings.hideSelected){let t=r.getOption(a),e=r.getAdjacent(t,1);e&&r.setActiveOption(e)}r.isPending||r.settings.closeAfterSelect||r.refreshOptions(r.isFocused&&"single"!==o),0!=r.settings.closeAfterSelect&&r.isFull()?r.close():r.isPending||r.positionDropdown(),r.trigger("item_add",a,n),r.isPending||r.updateOriginalInput({silent:e})}(!r.isPending||!i&&r.isFull())&&(r.inputState(),r.refreshState())}}))}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var i,r;const o=t.dataset.value;i=Q(t),t.remove(),t.classList.contains("active")&&(r=n.activeItems.indexOf(t),n.activeItems.splice(r,1),Y(t,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(o)&&n.removeOption(o,e),i<n.caretPos&&n.setCaret(n.caretPos-1),n.updateOriginalInput({silent:e}),n.refreshState(),n.positionDropdown(),n.trigger("item_remove",o,t)}createItem(t=null,e=(()=>{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var n,i=this,r=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t))return e(),!1;i.lock();var o=!1,a=t=>{if(i.unlock(),!t||"object"!=typeof t)return e();var n=gt(t[i.settings.valueField]);if("string"!=typeof n)return e();i.setTextboxValue(),i.addOption(t,!0),i.setCaret(r),i.addItem(n),e(t),o=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,t,a):{[i.settings.labelField]:t,[i.settings.valueField]:t},o||a(n),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const i=t.wrapper.classList;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("readonly",t.isReadOnly),i.toggle("required",t.isRequired),i.toggle("invalid",!t.isValid),i.toggle("locked",n),i.toggle("full",e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",J(t.options)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,i;const r=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],a=e.input.querySelectorAll("option:checked").length;function s(t,n,i){return t||(t=q('<option value="'+yt(n)+'">'+yt(i)+"</option>")),t!=r&&e.input.append(t),o.push(t),(t!=r||a>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?s(r,"",""):e.items.forEach((t=>{n=e.options[t],i=n[e.settings.labelField]||"",o.includes(n.$option)?s(e.input.querySelector(`option[value="${Ot(t)}"]:not(:checked)`),t,i):n.$option=s(n.$option,t,i)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,tt(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),V(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),V(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,tt(e.focus_node,{"aria-expanded":"false"}),V(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,i=e.left+window.scrollX;V(this.dropdown,{width:e.width+"px",top:n+"px",left:i+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();R(n,(t=>{e.removeItem(t,!0)})),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,n=e.caretPos,i=e.control;i.insertBefore(t,i.children[n]||null),e.setCaret(n+1)}deleteSelection(t){var e,n,i,r,o=this;e=t&&t.keyCode===ht?-1:1,n=xt(o.control_input);const a=[];if(o.activeItems.length)r=X(o.activeItems,e),i=Q(r),e>0&&i++,R(o.activeItems,(t=>a.push(t)));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const t=o.controlChildren();let i;e<0&&0===n.start&&0===n.length?i=t[o.caretPos-1]:e>0&&n.start===o.inputValue().length&&(i=t[o.caretPos]),void 0!==i&&a.push(i)}if(!o.shouldDelete(a,t))return!1;for(kt(t,!0),void 0!==i&&o.setCaret(i);a.length;)o.removeItem(a.pop());return o.inputState(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(t,e){const n=t.map((t=>t.dataset.value));return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,e))}advanceSelection(t,e){var n,i,r=this;r.rtl&&(t*=-1),r.inputValue().length||(Ct(pt,e)||Ct("shiftKey",e)?(i=(n=r.getLastActive(t))?n.classList.contains("active")?r.getAdjacent(n,t,"item"):n:t>0?r.control_input.nextElementSibling:r.control_input.previousElementSibling)&&(i.classList.contains("active")&&r.removeActiveItem(n),r.setActiveItemClass(i)):r.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?X(n,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,Y(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var n,i;const r=this;if("function"!=typeof this.settings.render[t])return null;if(!(i=r.settings.render[t].call(this,e,yt)))return null;if(i=q(i),"option"===t||"option_create"===t?e[r.settings.disabledField]?tt(i,{"aria-disabled":"true"}):tt(i,{"data-selectable":""}):"optgroup"===t&&(n=e.group[r.settings.optgroupValueField],tt(i,{"data-group":n}),e.group[r.settings.disabledField]&&tt(i,{"data-disabled":""})),"option"===t||"item"===t){const n=vt(e[r.settings.valueField]);tt(i,{"data-value":n}),"item"===t?(Z(i,r.settings.itemClass),tt(i,{"data-ts-item":""})):(Z(i,r.settings.optionClass),tt(i,{role:"option",id:e.$id}),e.$div=i,r.options[n]=e)}return i}_render(t,e){const n=this.render(t,e);if(null==n)throw"HTMLElement expected";return n}clearCache(){R(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var i=this,r=i[e];i[e]=function(){var e,o;return"after"===t&&(e=r.apply(i,arguments)),o=n.apply(i,arguments),"instead"===t?o:("before"===t&&(e=r.apply(i,arguments)),e)}}}function Pt(){St(this.input,"change",(()=>{this.sync()}))}function Nt(t){var e=this,n=e.onOptionSelect;e.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var r=function(t,e){e?(t.checked=!0,i.uncheckedClassNames&&t.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&t.classList.add(...i.checkedClassNames)):(t.checked=!1,i.checkedClassNames&&t.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&t.classList.add(...i.uncheckedClassNames))},o=function(t){setTimeout((()=>{var e=t.querySelector("input."+i.className);e instanceof HTMLInputElement&&r(e,t.classList.contains("selected"))}),1)};e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option;e.settings.render.option=(n,o)=>{var a=q(t.call(e,n,o)),s=document.createElement("input");i.className&&s.classList.add(i.className),s.addEventListener("click",(function(t){kt(t)})),s.type="checkbox";const l=gt(n[e.settings.valueField]);return r(s,!!(l&&e.items.indexOf(l)>-1)),a.prepend(s),a}})),e.on("item_remove",(t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),o(n))})),e.on("item_add",(t=>{var n=e.getOption(t);n&&o(n)})),e.hook("instead","onOptionSelect",((t,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),e.removeItem(i.dataset.value),e.refreshOptions(),void kt(t,!0);n.call(e,t,i),o(i)}))}function Dt(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",html:t=>`<div class="${t.className}" title="${t.title}">&#10799;</div>`},t);e.on("initialize",(()=>{var t=q(n.html(n));t.addEventListener("click",(t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))}const jt=(t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t.nextSibling)},It=(t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t)},Rt=(t,e)=>{do{var n;if(t==(e=null==(n=e)?void 0:n.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1};function Ft(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,n=t.unlock;let i,r=!0;t.hook("after","setupTemplates",(()=>{var e=t.settings.render.item;t.settings.render.item=(n,o)=>{const a=q(e.call(t,n,o));tt(a,{draggable:"true"});const s=t=>{i=a,setTimeout((()=>{a.classList.add("ts-dragging")}),0)},l=t=>{t.preventDefault(),a.classList.add("ts-drag-over"),c(a,i)},u=()=>{a.classList.remove("ts-drag-over")},c=(t,e)=>{void 0!==e&&(Rt(e,a)?jt(t,e):It(t,e))},h=()=>{var e;document.querySelectorAll(".ts-drag-over").forEach((t=>t.classList.remove("ts-drag-over"))),null==(e=i)||e.classList.remove("ts-dragging"),i=void 0;var n=[];t.control.querySelectorAll("[data-value]").forEach((t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}})),t.setValue(n)};return St(a,"mousedown",(t=>{r||kt(t),t.stopPropagation()})),St(a,"dragstart",s),St(a,"dragenter",l),St(a,"dragover",l),St(a,"dragleave",u),St(a,"dragend",h),a}})),t.hook("instead","lock",(()=>(r=!1,e.call(t)))),t.hook("instead","unlock",(()=>(r=!0,n.call(t))))}function Bt(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a class="'+t.closeClass+'">&times;</a></div></div>'},t);e.on("initialize",(()=>{var t=q(n.html(n)),i=t.querySelector("."+n.closeClass);i&&i.addEventListener("click",(t=>{kt(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))}function zt(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((n,i)=>{i<e?t.control_input.insertAdjacentElement("beforebegin",n):t.control.appendChild(n)})):e=t.items.length,t.caretPos=e})),t.hook("instead","moveCaret",(e=>{if(!t.isFocused)return;const n=t.getLastActive(e);if(n){const i=Q(n);t.setCaret(e>0?i+1:i),t.setActiveItem(),Y(n,"last-active")}else t.setCaret(t.caretPos+e)}))}function qt(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,Z(t.control_input,"dropdown-input");const e=q('<div class="dropdown-input-wrap">');e.append(t.control_input),t.dropdown.insertBefore(e,t.dropdown.firstChild);const n=q('<input class="items-placeholder" tabindex="-1" />');n.placeholder=t.settings.placeholder||"",t.control.append(n)})),t.on("initialize",(()=>{t.control_input.addEventListener("keydown",(e=>{switch(e.keyCode){case at:return t.isOpen&&(kt(e,!0),t.close()),void t.clearActiveItems();case ft:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)})),t.on("blur",(()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex})),t.on("dropdown_open",(()=>{t.control_input.focus()}));const e=t.onBlur;t.hook("instead","onBlur",(n=>{if(!n||n.relatedTarget!=t.control_input)return e.call(t)})),St(t.control_input,"blur",(()=>t.onBlur())),t.hook("before","close",(()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})}))}))}function Ht(){var t=this;t.on("initialize",(()=>{var e=document.createElement("span"),n=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);var i=["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"];for(const t of i)e.style[t]=n.style[t];var r=()=>{e.textContent=n.value,n.style.width=e.clientWidth+"px"};r(),t.on("update item_add item_remove",r),St(n,"input",r),St(n,"keyup",r),St(n,"blur",r),St(n,"update",r)}))}function Wt(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",(n=>!!t.activeItems.length&&e.call(t,n)))}function Ut(){this.hook("instead","setActiveItem",(()=>{})),this.hook("instead","selectAll",(()=>{}))}function Vt(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",(n=>{var i,r,o,a;if(!t.isOpen||n.keyCode!==st&&n.keyCode!==ut)return e.call(t,n);t.ignoreHover=!0,a=K(t.activeOption,"[data-group]"),i=Q(t.activeOption,"[data-selectable]"),a&&(a=n.keyCode===st?a.previousSibling:a.nextSibling)&&(r=(o=a.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,i)])&&t.setActiveOption(r)}))}function Zt(t){const e=Object.assign({label:"&times;",title:"Remove",className:"remove",append:!0},t);var n=this;if(e.append){var i='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+yt(e.title)+'">'+e.label+"</a>";n.hook("after","setupTemplates",(()=>{var t=n.settings.render.item;n.settings.render.item=(e,r)=>{var o=q(t.call(n,e,r)),a=q(i);return o.appendChild(a),St(a,"mousedown",(t=>{kt(t,!0)})),St(a,"click",(t=>{n.isLocked||(kt(t,!0),n.isLocked||n.shouldDelete([o],t)&&(n.removeItem(o),n.refreshOptions(!1),n.inputState()))})),o}}))}}function Yt(t){const e=this,n=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",(function(t){if(e.isFocused&&""===e.control_input.value.trim()){var i=e.options[t];i&&e.setTextboxValue(n.text.call(e,i))}}))}function $t(){const t=this,e=t.canLoad,n=t.clearActiveOption,i=t.loadCallback;var r,o,a={},s=!1,l=[];if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(r.clientHeight/(r.scrollHeight-r.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];const u=e=>!("number"==typeof t.settings.maxOptions&&r.children.length>=t.settings.maxOptions||!(e in a)||!a[e]),c=(e,n)=>t.items.indexOf(n)>=0||l.indexOf(n)>=0;t.setNextUrl=(t,e)=>{a[t]=e},t.getUrl=e=>{if(e in a){const t=a[e];return a[e]=!1,t}return t.clearPagination(),t.settings.firstUrl.call(t,e)},t.clearPagination=()=>{a={}},t.hook("instead","clearActiveOption",(()=>{if(!s)return n.call(t)})),t.hook("instead","canLoad",(n=>n in a?u(n):e.call(t,n))),t.hook("instead","loadCallback",((e,n)=>{if(s){if(o){const n=e[0];void 0!==n&&(o.dataset.value=n[t.settings.valueField])}}else t.clearOptions(c);i.call(t,e,n),s=!1})),t.hook("after","refreshOptions",(()=>{const e=t.lastValue;var n;u(e)?(n=t.render("loading_more",{query:e}))&&(n.setAttribute("data-selectable",""),o=n):e in a&&!r.querySelector(".no-results")&&(n=t.render("no_more_results",{query:e})),n&&(Z(n,t.settings.optionClass),r.append(n))})),t.on("initialize",(()=>{l=Object.keys(t.options),r=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},t.settings.render),r.addEventListener("scroll",(()=>{t.settings.shouldLoadMore.call(t)&&u(t.lastValue)&&(s||(s=!0,t.load.call(t,t.lastValue)))}))}))}return Mt.define("change_listener",Pt),Mt.define("checkbox_options",Nt),Mt.define("clear_button",Dt),Mt.define("drag_drop",Ft),Mt.define("dropdown_header",Bt),Mt.define("caret_position",zt),Mt.define("dropdown_input",qt),Mt.define("input_autogrow",Ht),Mt.define("no_backspace_delete",Wt),Mt.define("no_active_items",Ut),Mt.define("optgroup_columns",Vt),Mt.define("remove_button",Zt),Mt.define("restore_on_backspace",Yt),Mt.define("virtual_scroll",$t),Mt}()},1250:(t,e,n)=>{"use strict";n.d(e,{A:()=>$t});var i={};function r(t,e){return function(){return t.apply(e,arguments)}}n.r(i),n.d(i,{hasBrowserEnv:()=>rt,hasStandardBrowserEnv:()=>ot,hasStandardBrowserWebWorkerEnv:()=>st});const{toString:o}=Object.prototype,{getPrototypeOf:a}=Object,s=(l=Object.create(null),t=>{const e=o.call(t);return l[e]||(l[e]=e.slice(8,-1).toLowerCase())});var l;const u=t=>(t=t.toLowerCase(),e=>s(e)===t),c=t=>e=>typeof e===t,{isArray:h}=Array,d=c("undefined");const f=u("ArrayBuffer");const p=c("string"),m=c("function"),g=c("number"),v=t=>null!==t&&"object"==typeof t,y=t=>{if("object"!==s(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},b=u("Date"),_=u("File"),w=u("Blob"),x=u("FileList"),k=u("URLSearchParams");function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let i,r;if("object"!=typeof t&&(t=[t]),h(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let a;for(i=0;i<o;i++)a=r[i],e.call(null,t[a],a,t)}}function C(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,O=t=>!d(t)&&t!==T;const E=(A="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>A&&t instanceof A);var A;const L=u("HTMLFormElement"),M=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),P=u("RegExp"),N=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};S(n,((n,r)=>{let o;!1!==(o=e(n,r,t))&&(i[r]=o||n)})),Object.defineProperties(t,i)},D="abcdefghijklmnopqrstuvwxyz",j="0123456789",I={DIGIT:j,ALPHA:D,ALPHA_DIGIT:D+D.toUpperCase()+j};const R=u("AsyncFunction"),F={isArray:h,isArrayBuffer:f,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&m(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||m(t.append)&&("formdata"===(e=s(t))||"object"===e&&m(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&f(t.buffer),e},isString:p,isNumber:g,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:y,isUndefined:d,isDate:b,isFile:_,isBlob:w,isRegExp:P,isFunction:m,isStream:t=>v(t)&&m(t.pipe),isURLSearchParams:k,isTypedArray:E,isFileList:x,forEach:S,merge:function t(){const{caseless:e}=O(this)&&this||{},n={},i=(i,r)=>{const o=e&&C(n,r)||r;y(n[o])&&y(i)?n[o]=t(n[o],i):y(i)?n[o]=t({},i):h(i)?n[o]=i.slice():n[o]=i};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&S(arguments[t],i);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(S(e,((e,i)=>{n&&m(e)?t[i]=r(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,o,s;const l={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)s=r[o],i&&!i(s,t,e)||l[s]||(e[s]=t[s],l[s]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:u,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(h(t))return t;let e=t.length;if(!g(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:L,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:N,freezeMethods:t=>{N(t,((e,n)=>{if(m(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];m(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return h(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:C,global:T,isContextDefined:O,ALPHABET:I,generateString:(t=16,e=I.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n},isSpecCompliantForm:function(t){return!!(t&&m(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=h(t)?[]:{};return S(t,((t,e)=>{const o=n(t,i+1);!d(o)&&(r[e]=o)})),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:R,isThenable:t=>t&&(v(t)||m(t))&&m(t.then)&&m(t.catch)};function B(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}F.inherits(B,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const z=B.prototype,q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{q[t]={value:t}})),Object.defineProperties(B,q),Object.defineProperty(z,"isAxiosError",{value:!0}),B.from=(t,e,n,i,r,o)=>{const a=Object.create(z);return F.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),B.call(a,t.message,e,n,i,r),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};const H=B;var W=n(8287).hp;function U(t){return F.isPlainObject(t)||F.isArray(t)}function V(t){return F.endsWith(t,"[]")?t.slice(0,-2):t}function Z(t,e,n){return t?t.concat(e).map((function(t,e){return t=V(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Y=F.toFlatObject(F,{},null,(function(t){return/^is[A-Z]/.test(t)}));const $=function(t,e,n){if(!F.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!F.isUndefined(e[t])}))).metaTokens,r=n.visitor||u,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(F.isDate(t))return t.toISOString();if(!s&&F.isBlob(t))throw new H("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(t)||F.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):W.from(t):t}function u(t,n,r){let s=t;if(t&&!r&&"object"==typeof t)if(F.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(F.isArray(t)&&function(t){return F.isArray(t)&&!t.some(U)}(t)||(F.isFileList(t)||F.endsWith(n,"[]"))&&(s=F.toArray(t)))return n=V(n),s.forEach((function(t,i){!F.isUndefined(t)&&null!==t&&e.append(!0===a?Z([n],i,o):null===a?n:n+"[]",l(t))})),!1;return!!U(t)||(e.append(Z(r,n,o),l(t)),!1)}const c=[],h=Object.assign(Y,{defaultVisitor:u,convertValue:l,isVisitable:U});if(!F.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!F.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+i.join("."));c.push(n),F.forEach(n,(function(n,o){!0===(!(F.isUndefined(n)||null===n)&&r.call(e,n,F.isString(o)?o.trim():o,i,h))&&t(n,i?i.concat(o):[o])})),c.pop()}}(t),e};function G(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function K(t,e){this._pairs=[],t&&$(t,this,e)}const X=K.prototype;X.append=function(t,e){this._pairs.push([t,e])},X.toString=function(t){const e=t?function(e){return t.call(this,e,G)}:G;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const J=K;function Q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tt(t,e,n){if(!e)return t;const i=n&&n.encode||Q,r=n&&n.serialize;let o;if(o=r?r(e,n):F.isURLSearchParams(e)?e.toString():new J(e,n).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}const et=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){F.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},it={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:J,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},rt="undefined"!=typeof window&&"undefined"!=typeof document,ot=(at="undefined"!=typeof navigator&&navigator.product,rt&&["ReactNative","NativeScript","NS"].indexOf(at)<0);var at;const st="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,lt={...i,...it};const ut=function(t){function e(t,n,i,r){let o=t[r++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=r>=t.length;if(o=!o&&F.isArray(i)?i.length:o,s)return F.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a;i[o]&&F.isObject(i[o])||(i[o]=[]);return e(t,n,i[o],r)&&F.isArray(i[o])&&(i[o]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],e[o]=t[o];return e}(i[o])),!a}if(F.isFormData(t)&&F.isFunction(t.entries)){const n={};return F.forEachEntry(t,((t,i)=>{e(function(t){return F.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null};const ct={transitional:nt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=F.isObject(t);r&&F.isHTMLForm(t)&&(t=new FormData(t));if(F.isFormData(t))return i?JSON.stringify(ut(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return $(t,new lt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return lt.isNode&&F.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=F.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return $(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(F.isString(t))try{return(e||JSON.parse)(t),F.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||ct.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&F.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw H.from(t,H.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:lt.classes.FormData,Blob:lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(t=>{ct.headers[t]={}}));const ht=ct,dt=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ft=Symbol("internals");function pt(t){return t&&String(t).trim().toLowerCase()}function mt(t){return!1===t||null==t?t:F.isArray(t)?t.map(mt):String(t)}function gt(t,e,n,i,r){return F.isFunction(i)?i.call(this,e,n):(r&&(e=n),F.isString(e)?F.isString(i)?-1!==e.indexOf(i):F.isRegExp(i)?i.test(e):void 0:void 0)}class vt{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=pt(e);if(!r)throw new Error("header name must be a non-empty string");const o=F.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||e]=mt(t))}const o=(t,e)=>F.forEach(t,((t,n)=>r(t,n,e)));return F.isPlainObject(t)||t instanceof this.constructor?o(t,e):F.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&dt[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=pt(t)){const n=F.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(F.isFunction(e))return e.call(this,t,n);if(F.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=pt(t)){const n=F.findKey(this,t);return!(!n||void 0===this[n]||e&&!gt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=pt(t)){const r=F.findKey(n,t);!r||e&&!gt(0,n[r],r,e)||(delete n[r],i=!0)}}return F.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!gt(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return F.forEach(this,((i,r)=>{const o=F.findKey(n,r);if(o)return e[o]=mt(i),void delete e[r];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();a!==r&&delete e[r],e[a]=mt(i),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return F.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&F.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[ft]=this[ft]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=pt(t);e[i]||(!function(t,e){const n=F.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return F.isArray(t)?t.forEach(i):i(t),this}}vt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(vt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),F.freezeMethods(vt);const yt=vt;function bt(t,e){const n=this||ht,i=e||n,r=yt.from(i.headers);let o=i.data;return F.forEach(t,(function(t){o=t.call(n,o,r.normalize(),e?e.status:void 0)})),r.normalize(),o}function _t(t){return!(!t||!t.__CANCEL__)}function wt(t,e,n){H.call(this,null==t?"canceled":t,H.ERR_CANCELED,e,n),this.name="CanceledError"}F.inherits(wt,H,{__CANCEL__:!0});const xt=wt;const kt=lt.hasStandardBrowserEnv?{write(t,e,n,i,r,o){const a=[t+"="+encodeURIComponent(e)];F.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),F.isString(i)&&a.push("path="+i),F.isString(r)&&a.push("domain="+r),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function St(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Ct=lt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=F.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};const Tt=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,o=0,a=0;return e=void 0!==e?e:1e3,function(s){const l=Date.now(),u=i[a];r||(r=l),n[o]=s,i[o]=l;let c=a,h=0;for(;c!==o;)h+=n[c++],c%=t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),l-r<e)return;const d=u&&l-u;return d?Math.round(1e3*h/d):void 0}};function Ot(t,e){let n=0;const i=Tt(50,250);return r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,l=i(s);n=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:r};u[e?"download":"upload"]=!0,t(u)}}const Et={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let i=t.data;const r=yt.from(t.headers).normalize();let o,a,{responseType:s,withXSRFToken:l}=t;function u(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(F.isFormData(i))if(lt.hasStandardBrowserEnv||lt.hasStandardBrowserWebWorkerEnv)r.setContentType(!1);else if(!1!==(a=r.getContentType())){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];r.setContentType([t||"multipart/form-data",...e].join("; "))}let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const h=St(t.baseURL,t.url);function d(){if(!c)return;const i=yt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),u()}),(function(t){n(t),u()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:i,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),tt(h,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(new H("Request aborted",H.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new H("Network Error",H.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||nt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new H(e,i.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,t,c)),c=null},lt.hasStandardBrowserEnv&&(l&&F.isFunction(l)&&(l=l(t)),l||!1!==l&&Ct(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&kt.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===i&&r.setContentType(null),"setRequestHeader"in c&&F.forEach(r.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),F.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&"json"!==s&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Ot(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Ot(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{c&&(n(!e||e.type?new xt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(h);f&&-1===lt.protocols.indexOf(f)?n(new H("Unsupported protocol "+f+":",H.ERR_BAD_REQUEST,t)):c.send(i||null)}))}};F.forEach(Et,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const At=t=>`- ${t}`,Lt=t=>F.isFunction(t)||null===t||!1===t,Mt=t=>{t=F.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let o=0;o<e;o++){let e;if(n=t[o],i=n,!Lt(n)&&(i=Et[(e=String(n)).toLowerCase()],void 0===i))throw new H(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+o]=i}if(!i){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(At).join("\n"):" "+At(t[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i};function Pt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xt(null,t)}function Nt(t){Pt(t),t.headers=yt.from(t.headers),t.data=bt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Mt(t.adapter||ht.adapter)(t).then((function(e){return Pt(t),e.data=bt.call(t,t.transformResponse,e),e.headers=yt.from(e.headers),e}),(function(e){return _t(e)||(Pt(t),e&&e.response&&(e.response.data=bt.call(t,t.transformResponse,e.response),e.response.headers=yt.from(e.response.headers))),Promise.reject(e)}))}const Dt=t=>t instanceof yt?{...t}:t;function jt(t,e){e=e||{};const n={};function i(t,e,n){return F.isPlainObject(t)&&F.isPlainObject(e)?F.merge.call({caseless:n},t,e):F.isPlainObject(e)?F.merge({},e):F.isArray(e)?e.slice():e}function r(t,e,n){return F.isUndefined(e)?F.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function o(t,e){if(!F.isUndefined(e))return i(void 0,e)}function a(t,e){return F.isUndefined(e)?F.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function s(n,r,o){return o in e?i(n,r):o in t?i(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>r(Dt(t),Dt(e),!0)};return F.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=l[i]||r,a=o(t[i],e[i],i);F.isUndefined(a)&&o!==s||(n[i]=a)})),n}const It="1.6.8",Rt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Rt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ft={};Rt.transitional=function(t,e,n){return(i,r,o)=>{if(!1===t)throw new H(function(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(n?". "+n:"")}(r," has been removed"+(e?" in "+e:"")),H.ERR_DEPRECATED);return e&&!Ft[r]&&(Ft[r]=!0),!t||t(i,r,o)}};const Bt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const o=i[r],a=e[o];if(a){const e=t[o],n=void 0===e||a(e,o,t);if(!0!==n)throw new H("option "+o+" must be "+n,H.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new H("Unknown option "+o,H.ERR_BAD_OPTION)}},validators:Rt},zt=Bt.validators;class qt{constructor(t){this.defaults=t,this.interceptors={request:new et,response:new et}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Bt.assertOptions(n,{silentJSONParsing:zt.transitional(zt.boolean),forcedJSONParsing:zt.transitional(zt.boolean),clarifyTimeoutError:zt.transitional(zt.boolean)},!1),null!=i&&(F.isFunction(i)?e.paramsSerializer={serialize:i}:Bt.assertOptions(i,{encode:zt.function,serialize:zt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&F.merge(r.common,r[e.method]);r&&F.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=yt.concat(o,r);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let c,h=0;if(!s){const t=[Nt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,l),c=t.length,u=Promise.resolve(e);h<c;)u=u.then(t[h++],t[h++]);return u}c=a.length;let d=e;for(h=0;h<c;){const t=a[h++],e=a[h++];try{d=t(d)}catch(t){e.call(this,t);break}}try{u=Nt.call(this,d)}catch(t){return Promise.reject(t)}for(h=0,c=l.length;h<c;)u=u.then(l[h++],l[h++]);return u}getUri(t){return tt(St((t=jt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}F.forEach(["delete","get","head","options"],(function(t){qt.prototype[t]=function(e,n){return this.request(jt(n||{},{method:t,url:e,data:(n||{}).data}))}})),F.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(jt(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}qt.prototype[t]=e(),qt.prototype[t+"Form"]=e(!0)}));const Ht=qt;class Wt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new xt(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Wt((function(e){t=e})),cancel:t}}}const Ut=Wt;const Vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vt).forEach((([t,e])=>{Vt[e]=t}));const Zt=Vt;const Yt=function t(e){const n=new Ht(e),i=r(Ht.prototype.request,n);return F.extend(i,Ht.prototype,n,{allOwnKeys:!0}),F.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(jt(e,n))},i}(ht);Yt.Axios=Ht,Yt.CanceledError=xt,Yt.CancelToken=Ut,Yt.isCancel=_t,Yt.VERSION=It,Yt.toFormData=$,Yt.AxiosError=H,Yt.Cancel=Yt.CanceledError,Yt.all=function(t){return Promise.all(t)},Yt.spread=function(t){return function(e){return t.apply(null,e)}},Yt.isAxiosError=function(t){return F.isObject(t)&&!0===t.isAxiosError},Yt.mergeConfig=jt,Yt.AxiosHeaders=yt,Yt.formToJSON=t=>ut(F.isHTMLForm(t)?new FormData(t):t),Yt.getAdapter=Mt,Yt.HttpStatusCode=Zt,Yt.default=Yt;const $t=Yt}}]);